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>] [day] [month] [year] [list]
Message-ID: <40ab531dfb491020ae1cc07d68dd03b0fb1d1fc8.1738440683.git.dxu@dxuuu.xyz>
Date: Sat,  1 Feb 2025 13:11:40 -0700
From: Daniel Xu <dxu@...uu.xyz>
To: linux-kbuild@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
	bpf@...r.kernel.org,
	jolsa@...nel.org
Subject: [PATCH] tools/build: Skip jobserver flgas in -s detection

Currently there is unnecessarily verbose output:

    $ make -j8 bzImage
    mkdir -p /home/dlxu/dev/linux/tools/objtool && make
      O=/home/dlxu/dev/linux subdir=tools/objtool --no-print-directory -C
      objtool
    mkdir -p /home/dlxu/dev/linux/tools/bpf/resolve_btfids && make
      O=/home/dlxu/dev/linux subdir=tools/bpf/resolve_btfids
      --no-print-directory -C bpf/resolve_btfids
      INSTALL libsubcmd_headers
      INSTALL libsubcmd_headers
      UPD     include/config/kernel.release

The reason this happens is that it seems that make is internally adding
the following flag to $(MAKEFLAGS):

    ---jobserver-auth=fifo:/tmp/GMfifo1880691

This breaks -s detection which searches for 's' in $(short-opts), as any
this entire long flag is treated as a short flag and the presence of any
's' triggers silent=1.

Fix by filtering out such flags so it's still correct to do a substring
search for 's'.

Signed-off-by: Daniel Xu <dxu@...uu.xyz>
---
 tools/scripts/Makefile.include | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
index 0aa4005017c7..a413f73a7856 100644
--- a/tools/scripts/Makefile.include
+++ b/tools/scripts/Makefile.include
@@ -139,9 +139,9 @@ endif
 # If the user is running make -s (silent mode), suppress echoing of commands
 # make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
 ifeq ($(filter 3.%,$(MAKE_VERSION)),)
-short-opts := $(firstword -$(MAKEFLAGS))
+short-opts := $(filter-out ---%,$(firstword -$(MAKEFLAGS)))
 else
-short-opts := $(filter-out --%,$(MAKEFLAGS))
+short-opts := $(filter-out --% ---%,$(MAKEFLAGS))
 endif
 
 ifneq ($(findstring s,$(short-opts)),)
-- 
2.47.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ