vmlinux.o: warning: objtool: __fentry__+0x16: return with modified stack frame
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: e11a93567d3f1e843300ed98ff049a4335db8015 commit: 72064474964724c59ddff58a581a31b1ede75cf9 objtool: Make stack validation frame-pointer-specific date: 6 weeks ago config: x86_64-buildonly-randconfig-r006-20220530 (https://download.01.org/0day-ci/archive/20220531/[email protected]/config) compiler: gcc-11 (Debian 11.3.0-1) 11.3.0 reproduce (this is a W=1 build): # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=72064474964724c59ddff58a581a31b1ede75cf9 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 72064474964724c59ddff58a581a31b1ede75cf9 # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
All warnings (new ones prefixed by >>):
vmlinux.o: warning: objtool: ibt_selftest+0x11: sibling call from callable instruction with modified stack frame
>> vmlinux.o: warning: objtool: __fentry__+0x16: return with modified stack frame
vmlinux.o: warning: objtool: fixup_bad_iret+0x7f: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: noist_exc_debug+0x45: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: exc_nmi+0x3a: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: poke_int3_handler+0x49: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: mce_check_crashing_cpu+0xc: call to __this_cpu_preempt_check.constprop.0() leaves .noinstr.text section vmlinux.o: warning: objtool: mce_wrmsrl+0x12: call to __this_cpu_preempt_check.constprop.0() leaves .noinstr.text section vmlinux.o: warning: objtool: mce_start+0x53: call to __this_cpu_preempt_check.constprop.0() leaves .noinstr.text section vmlinux.o: warning: objtool: mce_rdmsrl+0x13: call to __this_cpu_preempt_check.constprop.0() leaves .noinstr.text section vmlinux.o: warning: objtool: do_machine_check+0x5c: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: exc_machine_check+0x7b: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: noist_exc_machine_check+0x22: call to __this_cpu_preempt_check.constprop.0() leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_dynticks_eqs_enter+0x27: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_dynticks_eqs_exit+0x28: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_eqs_exit.constprop.0+0x34: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_eqs_enter.constprop.0+0x43: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_nmi_enter+0x3a: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_nmi_enter+0x53: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_nmi_exit+0x43: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: enter_from_user_mode+0x24: call to __kcsan_check_access() leaves .noinstr.text section vmlinux.o: warning: objtool: syscall_enter_from_user_mode+0x28: call to __kcsan_check_access() leaves .noinstr.text section vmlinux.o: warning: objtool: syscall_enter_from_user_mode_prepare+0x24: call to __kcsan_check_access() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_enter_from_user_mode+0x24: call to __kcsan_check_access() leaves .noinstr.text section vmlinux.o: warning: objtool: ibt_selftest+0x1e: return with modified stack frame
Signature · 2 lines
0-DAY CI Kernel Test Service https://01.org/lkp
Josh Poimboeuf
maintainerQuoted 15 lines · kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: e11a93567d3f1e843300ed98ff049a4335db8015 commit: 72064474964724c59ddff58a581a31b1ede75cf9 objtool: Make stack validation frame-pointer-specific date: 6 weeks ago config: x86_64-buildonly-randconfig-r006-20220530 (https://download.01.org/0day-ci/archive/20220531/202205310609.Rw55oP08-lkp(a)intel.com/config) compiler: gcc-11 (Debian 11.3.0-1) 11.3.0 reproduce (this is a W=1 build): # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=72064474964724c59ddff58a581a31b1ede75cf9 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 72064474964724c59ddff58a581a31b1ede75cf9 # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
Quoted 7 lines
If you fix the issue, kindly add following tag where applicable
Reported-by kernel test robot <[email protected]>All warnings (new ones prefixed by >>):
vmlinux.o: warning: objtool:
ibt_selftest+0x11: sibling call from callable instruction with modified stack frameQuoted 1 line
Quoted 1 line
vmlinux.o: warning: objtool:
__fentry__+0x16: return with modified stack frame
Here's a fix for this warning. Will post a proper patch tomorrow-ish.
arch/x86/kernel/Makefile +0 -4
@@ -36,10 +36,6 @@ KCSAN_SANITIZE := n OBJECT_FILES_NON_STANDARD_test_nx.o := y -ifdef CONFIG_FRAME_POINTER -OBJECT_FILES_NON_STANDARD_ftrace_$(BITS).o := y -endif - # If instrumentation of this dir is enabled, boot hangs during first second. # Probably could be more selective here, but note that files related to irqs, # boot, dumpstack/stacktrace, etc are either non-interesting or can lead to
arch/x86/kernel/ftrace_64.S +4 -0
@@ -175,6 +175,7 @@ SYM_INNER_LABEL(ftrace_caller_end, SYM_L_GLOBAL) jmp ftrace_epilogue SYM_FUNC_END(ftrace_caller); +STACK_FRAME_NON_STANDARD_FP(ftrace_caller) SYM_FUNC_START(ftrace_epilogue) /*
@@ -282,6 +283,7 @@ SYM_INNER_LABEL(ftrace_regs_caller_end, SYM_L_GLOBAL) jmp ftrace_epilogue SYM_FUNC_END(ftrace_regs_caller) +STACK_FRAME_NON_STANDARD_FP(ftrace_regs_caller) #else /* ! CONFIG_DYNAMIC_FTRACE */
@@ -311,6 +313,8 @@ trace: jmp ftrace_stub SYM_FUNC_END(__fentry__) EXPORT_SYMBOL(__fentry__) +STACK_FRAME_NON_STANDARD_FP(__fentry__) + #endif /* CONFIG_DYNAMIC_FTRACE */ #ifdef CONFIG_FUNCTION_GRAPH_TRACER
include/linux/objtool.h +6 -0
@@ -143,6 +143,12 @@ struct unwind_hint { .popsection .endm +.macro STACK_FRAME_NON_STANDARD_FP func:req +#ifdef CONFIG_FRAME_POINTER + STACK_FRAME_NON_STANDARD \func +#endif +.endm + .macro ANNOTATE_NOENDBR .Lhere_\@: .pushsection .discard.noendbr
tools/include/linux/objtool.h +6 -0
@@ -143,6 +143,12 @@ struct unwind_hint { .popsection .endm +.macro STACK_FRAME_NON_STANDARD_FP func:req +#ifdef CONFIG_FRAME_POINTER + STACK_FRAME_NON_STANDARD \func +#endif +.endm + .macro ANNOTATE_NOENDBR .Lhere_\@: .pushsection .discard.noendbr