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: <af9c413d-136a-413a-ad99-8aaf98f1e31c@iogearbox.net>
Date: Wed, 15 Jan 2025 16:06:31 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: Li Zhijian <lizhijian@...itsu.com>, bpf@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
 Shuah Khan <shuah@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
 Andrii Nakryiko <andrii@...nel.org>,
 Andrii Nakryiko <andrii.nakryiko@...il.com>, Quentin Monnet
 <qmo@...nel.org>, Masahiro Yamada <masahiroy@...nel.org>
Subject: Re: [PATCH bpf-next v3] selftests/Makefile: override the srctree for
 out-of-tree builds

On 1/15/25 2:47 AM, Li Zhijian wrote:
> Fixes an issue where out-of-tree kselftest builds fail when building
> the BPF and bpftools components. The failure occurs because the top-level
> Makefile passes a relative srctree path to its sub-Makefiles, which
> leads to errors in locating necessary files.
> 
> For example, the following error is encountered:
> 
> ```
> $ make V=1 O=$build/ TARGETS=hid kselftest-all
> ...
> make -C ../tools/testing/selftests all
> make[4]: Entering directory '/path/to/linux/tools/testing/selftests/hid'
> make  -C /path/to/linux/tools/testing/selftests/../../../tools/lib/bpf OUTPUT=/path/to/linux/O/kselftest/hid/tools/build/libbpf/ \
>              EXTRA_CFLAGS='-g -O0'                                      \
>              DESTDIR=/path/to/linux/O/kselftest/hid/tools prefix= all install_headers
> make[5]: Entering directory '/path/to/linux/tools/lib/bpf'
> ...
> make[5]: Entering directory '/path/to/linux/tools/bpf/bpftool'
> Makefile:127: ../tools/build/Makefile.feature: No such file or directory
> make[5]: *** No rule to make target '../tools/build/Makefile.feature'.  Stop.
> ```
> 
> To resolve this, override the srctree in the kselftests's top Makefile
> when performing an out-of-tree build. This ensures that all sub-Makefiles
> have the correct path to the source tree, preventing directory resolution
> errors.
> 
> Cc: Andrii Nakryiko <andrii.nakryiko@...il.com>
> Signed-off-by: Li Zhijian <lizhijian@...itsu.com>
> Tested-by: Quentin Monnet <qmo@...nel.org>

[...]
>   tools/testing/selftests/Makefile | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)

Shuah, want to pick this up given its the top-level Makefile or want us to
route it via bpf-next with your Ack? Fwiw, BPF CI went through fine.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ