Re: linux-next: Tree for Mar 18 (objtool)
From: Peter Zijlstra
Date: Thu Mar 19 2020 - 07:12:51 EST
On Wed, Mar 18, 2020 at 09:05:42PM +0100, Peter Zijlstra wrote:
> On Wed, Mar 18, 2020 at 01:23:52PM -0500, Josh Poimboeuf wrote:
> > 545ed6816b72 ("ubsan: add trap instrumentation option")
> >
> > Kees, any idea why that commit causes at least some BUG() statements to
> > output an extra UD2?
>
> "Built-in Function: void __builtin_trap (void)
>
> This function causes the program to exit abnormally. GCC implements
> this function by using a target-dependent mechanism (such as
> intentionally executing an illegal instruction) or by calling abort.
> The mechanism used may vary from release to release so you should
> not rely on any particular implementation."
>
> Sounds encouraging :-(
Kees, can you tell the GCC/LLVM folks that now you've used it in the
kernel we have very definite expectations of the implementation. Them
changing it is no longer an option.