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: <96023ef4-fa0b-4fc2-a6a7-ac32bc777c44@sirena.org.uk>
Date: Fri, 4 Oct 2024 14:07:49 +0100
From: Mark Brown <broonie@...nel.org>
To: Björn Töpel <bjorn@...nel.org>
Cc: Shuah Khan <shuah@...nel.org>, linux-kselftest@...r.kernel.org,
	bpf@...r.kernel.org, Andrii Nakryiko <andrii@...nel.org>,
	Eduard Zingerman <eddyz87@...il.com>,
	Mykola Lysenko <mykolal@...com>,
	Björn Töpel <bjorn@...osinc.com>,
	linux-kernel@...r.kernel.org,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will@...nel.org>, Mark Rutland <mark.rutland@....com>,
	Nick Desaulniers <ndesaulniers@...gle.com>,
	Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH] selftests: Do not skip BPF selftests by default

On Fri, Oct 04, 2024 at 11:53:47AM +0200, Björn Töpel wrote:
> From: Björn Töpel <bjorn@...osinc.com>
> 
> This effectively is a revert of commit 7a6eb7c34a78 ("selftests: Skip
> BPF seftests by default"). At the time when this was added, BPF had
> "build time dependencies on cutting edge versions". Since then a
> number of BPF capable tests has been included in net, hid, sched_ext.
> 
> There is no reason not to include BPF by default in the build.

The issue was always requiring a bleeding edge version of clang, not
sure if that's been relaxed yet, IIRC sometimes it required git
versions.  I have clang 20 installed here so that's not an issue for me
but given that that's not released yet it wouldn't be reasonable to
expect CI systems to install it.

There's a few other substantial issues with all of these suites now I
look, none of them build on arm64 since arm64 defconfig has
DEBUG_INFO_REDUCED=y which isn't compatible with CONFIG_DEBUG_INFO_BTF
so that gets turned off and the build splats trying to read the BTF out
of the kernel binary (which is a new build dep for the selftests
too...).  

   https://storage.kernelci.org/next/master/next-20241004/arm64/defconfig%2Bkselftest/gcc-12/config/

We also get a bunch of:

die__process_unit: DW_TAG_label (0xa) @ <0x58eb7> not handled!
die__process_unit: tag not supported 0xa (label)!

if we do turn enable CONFIG_DEBUG_INFO_BTF for arm64.  

The whole thing is also broken for cross compilation with clang since
everything is assuming that CROSS_COMPILE will be set for cross builds
but that's not the case for LLVM=1 builds - net gives:

  BPF_PROG nat6to4.bpf.o
  BPF_PROG sample_map_ret0.bpf.o
/usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /home/broonie/git/linux/tools/testing/selftests/net/libynl.a(ynl.o): Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /home/broonie/git/linux/tools/testing/selftests/net/libynl.a(ynl.o): Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /home/broonie/git/linux/tools/testing/selftests/net/libynl.a(ynl.o): Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: /home/broonie/git/linux/tools/testing/selftests/net/libynl.a: error adding symbols: file in wrong format
  BPF_PROG sample_ret0.bpf.o
collect2: error: ld returned 1 exit status

with similar errors in libbpf for HID:

/usr/bin/aarch64-linux-gnu-ld: /home/broonie/git/linux/tools/testing/selftests/hid/tools/build/libbpf/libbpf.a(libbpf-in.o): Relocations in generic ELF (EM: 62)
/usr/bin/aarch64-linux-gnu-ld: /home/broonie/git/linux/tools/testing/selftests/hid/tools/build/libbpf/libbpf.a(libbpf-in.o): Relocations in generic ELF (EM: 62)

KernelCI is seeing failures earlier with HID:

   https://storage.kernelci.org/next/master/next-20241004/arm64/defconfig%2Bkselftest/gcc-12/logs/kselftest.log

and an unrelated missing dependency on libssl for net that needs to be
fixed.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ