[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFULd4arDqeEz-qyB2kE74s8UwMnJbNz7stbFr+xo25YuK0WYw@mail.gmail.com>
Date: Thu, 18 Dec 2025 11:26:13 +0100
From: Uros Bizjak <ubizjak@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: 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 9:54 AM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Wed, Dec 17, 2025 at 03:39:07PM +0100, Uros Bizjak wrote:
>
> > > > What's worse, it only sometimes does this:
> > > >
> > > > $ grep ".byte[ ]*0x0f" defconfig-build/drivers/net/wireless/realtek/rtlwifi/base.s
> > > > 1: .byte0x0f,0x0b ;
> > > > 1: .byte 0x0f,0x0b ;
> > > >
> > > > W.T.F. and all that.
>
> > How about the attached patch that ensures that separator survives
> > macro expansion?
>
> Right, I think I tried that, it doesn't like things like retpoline.S
>
> > diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h
> > index 0e8c611bc9e2..76d2eb96dd49 100644
> > --- a/arch/x86/include/asm/asm.h
> > +++ b/arch/x86/include/asm/asm.h
> > @@ -17,7 +17,7 @@
> > # define __ASM_REGPFX %%
> > #endif
> >
> > -#define _ASM_BYTES(x, ...) __ASM_FORM(.byte x,##__VA_ARGS__ ;)
> > +#define _ASM_BYTES(x, ...) __ASM_FORM(.byte\t x,##__VA_ARGS__)
> >
> > #ifndef __x86_64__
> > /* 32 bit */
>
> $ make O=defconfig-build/ CC=gcc-8 arch/x86/lib/retpoline.o
> make[1]: Entering directory '/mnt/nvme/linux-2.6/defconfig-build'
> GEN Makefile
> CALL ../scripts/checksyscalls.sh
> DESCEND objtool
> INSTALL libsubcmd_headers
> AS arch/x86/lib/retpoline.o
> ../arch/x86/include/asm/GEN-for-each-reg.h: Assembler messages:
> ../arch/x86/include/asm/GEN-for-each-reg.h:140: Error: bad expression
> ../arch/x86/include/asm/GEN-for-each-reg.h:6: Info: macro invoked from here
> ../arch/x86/include/asm/GEN-for-each-reg.h:140: Error: junk at end of line, first unrecognized character is `t'
>
> Which is why I ended up splitting the definition :/
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/
Uros.
Powered by blists - more mailing lists