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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wjn1m+j1NYN6CKXvozOp-mmhXNFJLCub7Tr9JEz6Su5Lw@mail.gmail.com>
Date: Fri, 28 Mar 2025 17:14:25 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: "H. Peter Anvin (Intel)" <hpa@...or.com>, 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 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ