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: <e41a7fc8-824d-4369-b581-1fa8600ae3ec@linux.ibm.com>
Date: Wed, 26 Mar 2025 18:40:39 +0530
From: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>
To: Tomas Glozar <tglozar@...hat.com>, Steven Rostedt <rostedt@...dmis.org>
Cc: linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org,
        bpf@...r.kernel.org, John Kacur <jkacur@...hat.com>,
        Luis Goncalves <lgoncalv@...hat.com>, Quentin Monnet <qmo@...n.net>
Subject: Re: [PATCH] tools/build: Use SYSTEM_BPFTOOL for system bpftool


On 26/03/25 6:10 am, Tomas Glozar wrote:
> The feature test for system bpftool uses BPFTOOL as the variable to set
> its path, defaulting to just "bpftool" if not set by the user.
>
> This conflicts with selftests and a few other utilities, which expect
> BPFTOOL to be set to the in-tree bpftool path by default. For example,
> bpftool selftests fail to build:
>
> $ make -C tools/testing/selftests/bpf/
> make: Entering directory '/home/tglozar/dev/linux/tools/testing/selftests/bpf'
>
> make: *** No rule to make target 'bpftool', needed by '/home/tglozar/dev/linux/tools/testing/selftests/bpf/tools/include/vmlinux.h'.  Stop.
> make: Leaving directory '/home/tglozar/dev/linux/tools/testing/selftests/bpf'
>
> Fix the problem by renaming the variable used for system bpftool from
> BPFTOOL to SYSTEM_BPFTOOL, so that the new usage does not conflict with
> the existing one of BPFTOOL.
>
> Reported-by: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>
> Closes: https://lore.kernel.org/linux-kernel/5df6968a-2e5f-468e-b457-fc201535dd4c@linux.ibm.com/
> Suggested-by: Quentin Monnet <qmo@...n.net>
> Fixes: 8a635c3856dd ("tools/build: Add bpftool-skeletons feature test")
> Signed-off-by: Tomas Glozar <tglozar@...hat.com>
> ---
>   tools/build/feature/Makefile   | 2 +-
>   tools/scripts/Makefile.include | 2 +-
>   tools/tracing/rtla/Makefile    | 2 +-
>   3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> index 4f9c1d950f5d..b8b5fb183dd4 100644
> --- a/tools/build/feature/Makefile
> +++ b/tools/build/feature/Makefile
> @@ -419,7 +419,7 @@ $(OUTPUT)test-libpfm4.bin:
>   	$(BUILD) -lpfm
>   
>   $(OUTPUT)test-bpftool-skeletons.bin:
> -	$(BPFTOOL) version | grep '^features:.*skeletons' \
> +	$(SYSTEM_BPFTOOL) version | grep '^features:.*skeletons' \
>   		> $(@:.bin=.make.output) 2>&1
>   ###############################
>   
> diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
> index 6268534309aa..5158250988ce 100644
> --- a/tools/scripts/Makefile.include
> +++ b/tools/scripts/Makefile.include
> @@ -92,7 +92,7 @@ LLVM_OBJCOPY	?= llvm-objcopy
>   LLVM_STRIP	?= llvm-strip
>   
>   # Some tools require bpftool
> -BPFTOOL		?= bpftool
> +SYSTEM_BPFTOOL	?= bpftool
>   
>   ifeq ($(CC_NO_CLANG), 1)
>   EXTRA_WARNINGS += -Wstrict-aliasing=3
> diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile
> index 4cc3017dccaa..746ccf2f5808 100644
> --- a/tools/tracing/rtla/Makefile
> +++ b/tools/tracing/rtla/Makefile
> @@ -72,7 +72,7 @@ src/timerlat.bpf.o: src/timerlat.bpf.c
>   	$(QUIET_CLANG)$(CLANG) -g -O2 -target bpf -c $(filter %.c,$^) -o $@
>   
>   src/timerlat.skel.h: src/timerlat.bpf.o
> -	$(QUIET_GENSKEL)$(BPFTOOL) gen skeleton $< > $@
> +	$(QUIET_GENSKEL)$(SYSTEM_BPFTOOL) gen skeleton $< > $@
>   else
>   src/timerlat.skel.h:
>   	$(Q)echo '/* BPF skeleton is disabled */' > src/timerlat.skel.h

Tested this patch by applying on linux-next20250326 and this patch fixes 
the reported issue.

Please add below tag.

Tested-by: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>


Regards,

Venkat.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ