On Thu, Sep 17, 2020 at 11:49:04AM +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.
> 
> objtool silences similar warnings (trap after dead end instructions), 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]>
> Signed-off-by: Ilie Halip <[email protected]>

The patch looks good to me.  Which versions of Clang do the trap after
noreturn call?  It would be good to have that in the commit message.

-- 
Josh

Reply via email to