On Sat, Sep 19, 2020 at 09:41:18AM +0300, Ilie Halip wrote: > With CONFIG_UBSAN_TRAP enabled, the compiler may insert a trap instruction > after a call to a noreturn function. In this case, objtool warns that the > ud2 instruction is unreachable. > > This is a behavior seen with clang, from the oldest version capable of > building the mainline x64_64 kernel (9.0), to the latest experimental > version (12.0). > > objtool silences similar warnings (trap after dead end instructions), so > so expand that check to include dead end functions. > > Cc: Nick Desaulniers <[email protected]> > Cc: Rong Chen <[email protected]> > Cc: Marco Elver <[email protected]> > Cc: Philip Li <[email protected]> > Cc: Borislav Petkov <[email protected]> > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > BugLink: https://github.com/ClangBuiltLinux/linux/issues/1148 > Link: > https://lore.kernel.org/lkml/CAKwvOdmptEpi8fiOyWUo=aizjix+z+vhjom2bulprwsmtwl...@mail.gmail.com > Suggested-by: Nick Desaulniers <[email protected]> > Reviewed-by: Nick Desaulniers <[email protected]> > Tested-by: Nick Desaulniers <[email protected]> > Reported-by: kbuild test robot <[email protected]> > Signed-off-by: Ilie Halip <[email protected]> > --- > > Changed in v2: > - added a mention that this is a clang issue across all versions > - added Nick's Reviewed-by, Tested-by > - added Reported-by
Thanks. Queued. -- Josh

