summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/preload
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2020-08-25 15:23:46 -0700
committerAlexei Starovoitov <ast@kernel.org>2020-08-25 15:23:46 -0700
commit2532f849b5134c4c62a20e5aaca33d9fb08af528 (patch)
treec92e91cc28bde6f4cb5999c8b7480c861cafdd0e /kernel/bpf/preload
parentcd324d7abb3d850ae083bda1239f800abe21fe25 (diff)
downloadlinux-stable-2532f849b5134c4c62a20e5aaca33d9fb08af528.tar.gz
linux-stable-2532f849b5134c4c62a20e5aaca33d9fb08af528.tar.bz2
linux-stable-2532f849b5134c4c62a20e5aaca33d9fb08af528.zip
bpf: Disallow BPF_PRELOAD in allmodconfig builds
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>
Diffstat (limited to 'kernel/bpf/preload')
-rw-r--r--kernel/bpf/preload/Kconfig3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/bpf/preload/Kconfig b/kernel/bpf/preload/Kconfig
index 7144e2d01ee4..ace49111d3a3 100644
--- a/kernel/bpf/preload/Kconfig
+++ b/kernel/bpf/preload/Kconfig
@@ -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