Re: [GIT PULL] objtool fixes

From: Ingo Molnar
Date: Thu Apr 03 2025 - 11:33:25 EST



* Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:

> On Thu, Apr 03, 2025 at 04:52:57PM +0200, Ingo Molnar wrote:
> > +# ./arch/x86/include/asm/smap.h:35: alternative(ANNOTATE_IGNORE_ALTERNATIVE "", "stac", X86_FEATURE_SMAP);
> > #APP
> > # 35 "./arch/x86/include/asm/smap.h" 1
> > # ALT: oldinstr
> > 771:
> > + 911:
> > + .pushsection .discard.annotate_insn,"M",@progbits,8
> > + .long 911b - .
> > + .long 6
> > + .popsection
> >
> > 772:
> > # ALT: padding
> > @@ -140,10 +145,15 @@ copy_from_user_nmi:
> > .popsection
> >
> > # 0 "" 2
> > -# ./arch/x86/include/asm/smap.h:29: alternative("", "clac", X86_FEATURE_SMAP);
> > +# ./arch/x86/include/asm/smap.h:29: alternative(ANNOTATE_IGNORE_ALTERNATIVE "", "clac", X86_FEATURE_SMAP);
> > # 29 "./arch/x86/include/asm/smap.h" 1
> > # ALT: oldinstr
> > 771:
> > + 911:
> > + .pushsection .discard.annotate_insn,"M",@progbits,8
> > + .long 911b - .
> > + .long 6
> > + .popsection
> >
> > 772:
> > # ALT: padding
> >
> > Is there a way to make this more compact, more readable?
>
> Put it all one line? I'm open to ideas :-)

I suppose there's no way to make the '6' a bit less magic at this
point, we are post-processed already. :-/

Thanks,

Ingo