Re: [tip:core/objtool 2/25] arch/x86/kernel/dumpstack.o: warning: objtool: oops_end() falls through to next function show_regs()

From: Josh Poimboeuf
Date: Wed Apr 03 2019 - 17:00:48 EST


On Thu, Apr 04, 2019 at 01:43:05AM +0800, kbuild test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/objtool
> head: 64604d54d3115fee89598bfb6d8d2252f8a2d114
> commit: 37686b1353cfc30e127cef811959cdbcd0495d98 [2/25] tracing: Improve "if" macro code generation
> config: x86_64-randconfig-e2-03311307 (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
> reproduce:
> git checkout 37686b1353cfc30e127cef811959cdbcd0495d98
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All warnings (new ones prefixed by >>):
>
> >> arch/x86/kernel/dumpstack.o: warning: objtool: oops_end() falls through to next function show_regs()

This should be fixed by adding rewind_stack_do_exit() to the objtool
noreturn list. I'll post a proper patch soon.

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 38b0517dc49e..ac743a1d53ab 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -143,6 +143,7 @@ static int __dead_end_function(struct objtool_file *file, struct symbol *func,
"fortify_panic",
"usercopy_abort",
"machine_real_restart",
+ "rewind_stack_do_exit",
};

if (func->bind == STB_WEAK)