]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
bpf: Disallow BPF_PRELOAD in allmodconfig builds
authorAlexei Starovoitov <ast@kernel.org>
Tue, 25 Aug 2020 22:23:46 +0000 (15:23 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 25 Aug 2020 22:23:46 +0000 (15:23 -0700)
The CC_CAN_LINK checks that the host compiler can link, but bpf_preload
relies on libbpf which in turn needs libelf to be present during linking.
allmodconfig runs in odd setups with cross compilers and missing host
libraries like libelf. Instead of extending kconfig with every possible
library that bpf_preload might need disallow building BPF_PRELOAD in
such build-only configurations.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/preload/Kconfig

index 7144e2d01ee488af03d5740467fa79a0d85b3c8e..ace49111d3a3669b776944b327375cc2d939e78c 100644 (file)
@@ -6,6 +6,9 @@ config USERMODE_DRIVER
 menuconfig BPF_PRELOAD
        bool "Preload BPF file system with kernel specific program and map iterators"
        depends on BPF
+       # The dependency on !COMPILE_TEST prevents it from being enabled
+       # in allmodconfig or allyesconfig configurations
+       depends on !COMPILE_TEST
        select USERMODE_DRIVER
        help
          This builds kernel module with several embedded BPF programs that are