summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorKP Singh <kpsingh@google.com>2020-03-30 22:40:59 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2020-03-30 22:57:23 +0200
commit4edf16b72c57bb0faad5da143f812384df0c43f6 (patch)
treeee2e63b9471143ed78dca3db4b7bed72d2f33028 /init
parentc58b1558a7474fea6c914f061fab9121f10e38bb (diff)
downloadlinux-4edf16b72c57bb0faad5da143f812384df0c43f6.tar.gz
linux-4edf16b72c57bb0faad5da143f812384df0c43f6.tar.bz2
linux-4edf16b72c57bb0faad5da143f812384df0c43f6.zip
bpf, lsm: Make BPF_LSM depend on BPF_EVENTS
LSM and tracing programs share their helpers with bpf_tracing_func_proto which is only defined (in bpf_trace.c) when BPF_EVENTS is enabled. Instead of adding __weak symbol, make BPF_LSM depend on BPF_EVENTS so that both tracing and LSM programs can actually share helpers. Fixes: fc611f47f218 ("bpf: Introduce BPF_PROG_TYPE_LSM") Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: KP Singh <kpsingh@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20200330204059.13024-1-kpsingh@chromium.org
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index deae572d1927..7b7ea70e64ac 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1619,6 +1619,7 @@ config KALLSYMS_BASE_RELATIVE
config BPF_LSM
bool "LSM Instrumentation with BPF"
+ depends on BPF_EVENTS
depends on BPF_SYSCALL
depends on SECURITY
depends on BPF_JIT