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: <e9816f7c-a603-c73e-5fcc-71bbcf6c6ca3@iogearbox.net>
Date: Thu, 5 Sep 2024 20:52:12 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Pu Lehui <pulehui@...weicloud.com>, bpf@...r.kernel.org,
 linux-riscv@...ts.infradead.org, netdev@...r.kernel.org
Cc: Andrii Nakryiko <andrii@...nel.org>, Eduard Zingerman
 <eddyz87@...il.com>, Mykola Lysenko <mykolal@...com>,
 Björn Töpel <bjorn@...nel.org>,
 Puranjay Mohan <puranjay@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
 Martin KaFai Lau <martin.lau@...ux.dev>, Song Liu <song@...nel.org>,
 Yonghong Song <yonghong.song@...ux.dev>,
 John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
 Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>,
 Jiri Olsa <jolsa@...nel.org>, Palmer Dabbelt <palmer@...belt.com>,
 Pu Lehui <pulehui@...wei.com>
Subject: Re: [PATCH bpf-next v3 00/10] Local vmtest enhancement and RV64
 enabled

On 9/5/24 10:13 AM, Pu Lehui wrote:
> Patch 1-3 fix some problem about bpf selftests. Patch 4 add local rootfs
> image support for vmtest. Patch 5 enable cross-platform testing for
> vmtest. Patch 6-10 enable vmtest on RV64.
> 
> We can now perform cross platform testing for riscv64 bpf using the
> following command:
> 
> PLATFORM=riscv64 CROSS_COMPILE=riscv64-linux-gnu- \
>    tools/testing/selftests/bpf/vmtest.sh \
>    -l <path of local rootfs image> -- \
>    ./test_progs -d \
>        \"$(cat tools/testing/selftests/bpf/DENYLIST.riscv64 \
>            | cut -d'#' -f1 \
>            | sed -e 's/^[[:space:]]*//' \
>                  -e 's/[[:space:]]*$//' \
>            | tr -s '\n' ',' \
>        )\"
> 
> For better regression, we rely on commit [0]. And since the work of riscv
> ftrace to remove stop_machine atomic replacement is in progress, we also
> need to revert commit [1] [2].
> 
> The test platform is x86_64 architecture, and the versions of relevant
> components are as follows:
>      QEMU: 8.2.0
>      CLANG: 17.0.6 (align to BPF CI)
>      ROOTFS: ubuntu noble (generated by [3])
> 
> Link: https://lore.kernel.org/all/20240831071520.1630360-1-pulehui@huaweicloud.com/ [0]
> Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3308172276db [1]
> Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7caa9765465f [2]
> Link: https://github.com/libbpf/ci/blob/main/rootfs/mkrootfs_debian.sh [3]

Nice work! Next step is upstream BPF CI integration? :)

Fwiw, all still works for me on x86-64 (*), so:

Acked-by: Daniel Borkmann <daniel@...earbox.net>
Tested-by: Daniel Borkmann <daniel@...earbox.net>

(*) fresh Equinix Ubuntu instance still requires this one for vmtest.sh, but
     that is independent of this series (and for others it seems not required)

diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 04716a5e43f1..02dd161e5185 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -693,7 +693,7 @@ $(OUTPUT)/$(TRUNNER_BINARY): $(TRUNNER_TEST_OBJS)                   \
                              $(TRUNNER_BPFTOOL)                         \
                              | $(TRUNNER_BINARY)-extras
         $$(call msg,BINARY,,$$@)
-       $(Q)$$(CC) $$(CFLAGS) $$(filter %.a %.o,$$^) $$(LDLIBS) $$(LDFLAGS) -o $$@
+       $(Q)$$(CC) $$(CFLAGS) $(TRUNNER_LDFLAGS) $$(filter %.a %.o,$$^) $$(LDLIBS) $$(LDFLAGS) -o $$@
         $(Q)$(RESOLVE_BTFIDS) --btf $(TRUNNER_OUTPUT)/btf_data.bpf.o $$@
         $(Q)ln -sf $(if $2,..,.)/tools/build/bpftool/$(USE_BOOTSTRAP)bpftool \
                    $(OUTPUT)/$(if $2,$2/)bpftool
diff --git a/tools/testing/selftests/bpf/vmtest.sh b/tools/testing/selftests/bpf/vmtest.sh
index 79505d294c44..afbd6b785064 100755
--- a/tools/testing/selftests/bpf/vmtest.sh
+++ b/tools/testing/selftests/bpf/vmtest.sh
@@ -189,7 +189,7 @@ update_selftests()
         local selftests_dir="${kernel_checkout}/tools/testing/selftests/bpf"

         cd "${selftests_dir}"
-       ${make_command}
+       TRUNNER_LDFLAGS=-static ${make_command}

         # Mount the image and copy the selftests to the image.
         mount_image

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ