Re: next-20190125 - objtool complains about dumpstack
From: Josh Poimboeuf
Date: Mon Jan 28 2019 - 11:51:38 EST
On Sun, Jan 27, 2019 at 11:40:10PM -0500, valdis.kletnieks@xxxxxx wrote:
> On Sun, 27 Jan 2019 22:18:25 -0600, Josh Poimboeuf said:
> > On Sun, Jan 27, 2019 at 10:45:03PM -0500, valdis.kletnieks@xxxxxx wrote:
> > > Seen in a build:
> > >
> > > CC arch/x86/kernel/dumpstack.o
> > > arch/x86/kernel/dumpstack.o: warning: objtool: oops_begin()+0x9: undefined stack state
> > > arch/x86/kernel/dumpstack.o: warning: objtool: oops_begin()+0x0: stack state mismatch: cfa1=6+16 cfa2=7+8
> > >
> > > Probably a gcc9 code generation that objtool doesn't know about?
> >
> > Can you share the .o file?
>
> Sure. Attached.
Thanks for reporting it. Here's the fix below. I'll submit an official
patch soon.
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 0414a0d52262..df9bd60153c9 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -165,6 +165,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)