projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8842d5d
)
x86/alternative: Report missing return thunk details
author
Kees Cook
<keescook@chromium.org>
Wed, 13 Jul 2022 21:38:19 +0000
(14:38 -0700)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:25:31 +0000
(17:25 +0200)
commit
65cdf0d623bedf0e069bb64ed52e8bb20105e2ba
upstream.
Debugging missing return thunks is easier if we can see where they're
happening.
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link:
https://lore.kernel.org/lkml/Ys66hwtFcGbYmoiZ@hirez.programming.kicks-ass.net/
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/alternative.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/alternative.c
b/arch/x86/kernel/alternative.c
index 8ed9ccf53b6239b9d1b7c7b4e261074ed981b051..98a8b59f87f3601ab4a900f9a8e97eed0a2b2a34 100644
(file)
--- a/
arch/x86/kernel/alternative.c
+++ b/
arch/x86/kernel/alternative.c
@@
-554,7
+554,9
@@
void __init_or_module noinline apply_returns(s32 *start, s32 *end)
dest = addr + insn.length + insn.immediate.value;
if (__static_call_fixup(addr, op, dest) ||
- WARN_ON_ONCE(dest != &__x86_return_thunk))
+ WARN_ONCE(dest != &__x86_return_thunk,
+ "missing return thunk: %pS-%pS: %*ph",
+ addr, dest, 5, addr))
continue;
DPRINTK("return thunk at: %pS (%px) len: %d to: %pS",