Skip to content

Commit 65cdf0d

Browse files
keesPeter Zijlstra
authored andcommitted
x86/alternative: Report missing return thunk details
Debugging missing return thunks is easier if we can see where they're happening. Suggested-by: Peter Zijlstra <[email protected]> Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]/
1 parent 908fc4c commit 65cdf0d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/x86/kernel/alternative.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,9 @@ void __init_or_module noinline apply_returns(s32 *start, s32 *end)
555555
dest = addr + insn.length + insn.immediate.value;
556556

557557
if (__static_call_fixup(addr, op, dest) ||
558-
WARN_ON_ONCE(dest != &__x86_return_thunk))
558+
WARN_ONCE(dest != &__x86_return_thunk,
559+
"missing return thunk: %pS-%pS: %*ph",
560+
addr, dest, 5, addr))
559561
continue;
560562

561563
DPRINTK("return thunk at: %pS (%px) len: %d to: %pS",

0 commit comments

Comments
 (0)