[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMzpN2jtayVAEabwWmTOHMe3QVQEDmwXUVnvtfL0bsb10Qu4cA@mail.gmail.com>
Date: Thu, 18 Dec 2025 07:38:52 -0500
From: Brian Gerst <brgerst@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Uros Bizjak <ubizjak@...il.com>, Jean Delvare <jdelvare@...e.de>,
LKML <linux-kernel@...r.kernel.org>, Josh Poimboeuf <jpoimboe@...hat.com>, ardb@...nel.org,
Linus Torvalds <torvalds@...ux-foundation.org>, x86@...nel.org
Subject: Re: Build breakage caused by the use of UDB
On Thu, Dec 18, 2025 at 5:48 AM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Thu, Dec 18, 2025 at 11:38:53AM +0100, Peter Zijlstra wrote:
> > On Thu, Dec 18, 2025 at 11:26:13AM +0100, Uros Bizjak wrote:
> >
> > > I see... OTOH, a trivial solution would be to just use "ud2" mnemonic,
> > > as proposed in [1].
> > >
> > > [1] https://lore.kernel.org/lkml/20250909100038.1709394-1-ubizjak@gmail.com/
> >
> > Yes, there is that. I suppose I worry about all the other _ASM_BYTES
> > users, but since they don't actually show miscompilation, perhaps I
> > should not worry.
> >
> > Let me do a build with just using ud2 instead.
>
> Yep, this builds. Let me stick a changelog on with Fixes and Cc stable
> and stick it in x86/urgent.
>
> ---
>
> diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h
> index d561a8443c13..9b4e04690e1a 100644
> --- a/arch/x86/include/asm/bug.h
> +++ b/arch/x86/include/asm/bug.h
> @@ -15,7 +15,7 @@ extern void __WARN_trap(struct bug_entry *bug, ...);
> /*
> * Despite that some emulators terminate on UD2, we use it for WARN().
> */
> -#define ASM_UD2 _ASM_BYTES(0x0f, 0x0b)
> +#define ASM_UD2 __ASM_FORM(ud2)
> #define INSN_UD2 0x0b0f
> #define LEN_UD2 2
>
>
Replace all instances of ASM_UD2 with the instruction. There is no
need to keep it now.
Brian Gerst
Powered by blists - more mailing lists