[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aanudixqjhm7asrp5tzsx5vc7pctei5bskdhdxk5up2g6gvqbz@z7owxfn6krgt>
Date: Thu, 3 Apr 2025 08:23:55 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [GIT PULL] objtool fixes
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 :-)
> Or if not, we just have to do the more fragile thing I suspect?
> It's a tool after all.
Objtool is an integral part of the kernel. Making it more fragile and
less maintainable has the same effect on the kernel itself.
In fact we need the toolchain to be *more* reliable than the kernel.
Otherwise problems multiply, and kernel quality goes down the tubes.
And I would rather spend time fixing actual kernel bugs than chasing
down random nonsensical warnings.
Sure, ideally the .s file would be pretty, but not at the expense of
actual robustness and functionality... Honestly I had to double check it
wasn't April 1.
--
Josh
Powered by blists - more mailing lists