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] [day] [month] [year] [list]
Message-ID: <CAJZ5v0h2w8sSer1rWMRKh10QwhXSXW6j_ePTm7CEY=4n7nJWhg@mail.gmail.com>
Date: Wed, 2 Apr 2025 12:06:48 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Riwen Lu <luriwen@...inos.cn>
Cc: o-takashi@...amocchi.jp, rafael@...nel.org, lenb@...nel.org, 
	linux1394-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org, 
	linux-acpi@...r.kernel.org, yu.c.chen@...el.com, k2ci <kernel-bot@...inos.cn>, 
	Masahiro Yamada <masahiroy@...nel.org>
Subject: Re: [PATCH v2] tools: Restore built-in rules for subdirectory tool compilation

On Wed, Apr 2, 2025 at 9:54 AM Riwen Lu <luriwen@...inos.cn> wrote:
>
> Prior to commit d1d096312176 ("tools: fix annoying "mkdir -p ..." logs
> when building tools in parallel"), the top-level MAKEFLAGS=-rR
> (disabling built-in rules/variables) was overridden by
> subdirectory-specific MAKEFLAGS during tools compilation. This allowed
> tools like pfrut and firewire to implicitly rely on Make's built-in rules.
>
> After the aforementioned commit, the -rR flags from the top-level
> Makefile began propagating to subdirectory builds. This broke tools
> depending on implicit rules because:
> 1. -r (--no-builtin-rules) disabled implicit .c -> .o rules
> 2. -R (--no-builtin-variables) hid critical implicit variables like CC
>
> Fix this by filtering out -rR from MAKEFLAGS.
>
> Fixes: d1d096312176 ("tools: fix annoying "mkdir -p ..." logs when building tools in parallel")

It would be good to CC the author of the above commit (added).

> Reported-by: k2ci <kernel-bot@...inos.cn>
> Signed-off-by: Riwen Lu <luriwen@...inos.cn>
> ---
>  Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index d138b17b8840..abf9cfebaf4f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1431,11 +1431,11 @@ endif
>
>  tools/: FORCE
>         $(Q)mkdir -p $(objtree)/tools
> -       $(Q)$(MAKE) LDFLAGS= O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/
> +       $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter-out rR,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/
>
>  tools/%: FORCE
>         $(Q)mkdir -p $(objtree)/tools
> -       $(Q)$(MAKE) LDFLAGS= O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ $*
> +       $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter-out rR,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ $*
>
>  # ---------------------------------------------------------------------------
>  # Kernel selftest
> --

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ