lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <69F3FAF7-7F30-4740-A536-672DB6A2372D@zytor.com>
Date: Fri, 28 Mar 2025 17:56:48 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
        Jakub Kicinski <kuba@...nel.org>
CC: Michael Kelley <mhklinux@...look.com>, "Xin Li (Intel)" <xin@...or.com>,
        "Borislav Petkov (AMD)" <bp@...en8.de>, Ingo Molnar <mingo@...nel.org>,
        Nikolay Borisov <nik.borisov@...e.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [tip: x86/core] x86/cpufeatures: Generate the <asm/cpufeaturemasks.h> header based on build config

On March 28, 2025 5:14:25 PM PDT, Linus Torvalds <torvalds@...ux-foundation.org> wrote:
>On Fri, 28 Mar 2025 at 16:23, Jakub Kicinski <kuba@...nel.org> wrote:
>>
>> FWIW this also makes netdev CI melt down. Combination of allmodconfig
>> insisting on WERROR, us insisting on W=1, and this change insisting on
>> full kernel rebuild every time .config is touched :( IOW we do:
>>
>>         make allmodconfig
>>         ./scripts/config -d werror
>>         make -j W=1
>>
>> Could a hack like this fly? I don't see an easy way out ..
>
>Ok, clearly we need something like this.
>
>That said, your patch makes my skin crawl a bit. Not because it's
>wrong, but because it really makes me think "why don't we have this as
>part of our normal "cmd_gen_" infrastructure?
>
>In fact, we *do* have something like that for our infrastructure: it's
>the 'filechk' macro.
>
>So I think the real fix is something like this ENTIRELY UNTESTED
>patch.  Whitespace-damaged again to make sure people don't apply this
>mindlessly, it needs more thought:
>
>   arch/x86/Makefile | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
>  diff --git a/arch/x86/Makefile b/arch/x86/Makefile
>  index 0fc7e8fd1a2e..769b29bf26ba 100644
>  --- a/arch/x86/Makefile
>  +++ b/arch/x86/Makefile
>  @@ -278,11 +278,11 @@ cpufeaturemasks.awk :=
>$(srctree)/arch/x86/tools/cpufeaturemasks.awk
>   cpufeatures_hdr := $(srctree)/arch/x86/include/asm/cpufeatures.h
>   targets += $(cpufeaturemasks.hdr)
>   quiet_cmd_gen_featuremasks = GEN     $@
>  -      cmd_gen_featuremasks = $(AWK) -f $(cpufeaturemasks.awk)
>$(cpufeatures_hdr) $(KCONFIG_CONFIG) > $@
>  +      filechk_featuremasks = $(AWK) -f $(cpufeaturemasks.awk)
>$(cpufeatures_hdr) $(KCONFIG_CONFIG)
>
>   $(cpufeaturemasks.hdr): $(cpufeaturemasks.awk) $(cpufeatures_hdr)
>$(KCONFIG_CONFIG) FORCE
>        $(shell mkdir -p $(dir $@))
>  -     $(call if_changed,gen_featuremasks)
>  +     $(call filechk,featuremasks)
>   archprepare: $(cpufeaturemasks.hdr)
>
>   ###
>
>does something like that work? (And really: note the "something like
>that" part, this may be *entirely* broken)
>
>             Linus

This also points out a need here: the header generator output probably should suffer replace-if-changed. Too bad we have to use such primitive tools :(

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ