Skip to content

Commit 4edf16b

Browse files
sinkapborkmann
authored andcommitted
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: fc611f4 ("bpf: Introduce BPF_PROG_TYPE_LSM") Reported-by: Randy Dunlap <[email protected]> Signed-off-by: KP Singh <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent c58b155 commit 4edf16b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

init/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,6 +1619,7 @@ config KALLSYMS_BASE_RELATIVE
16191619

16201620
config BPF_LSM
16211621
bool "LSM Instrumentation with BPF"
1622+
depends on BPF_EVENTS
16221623
depends on BPF_SYSCALL
16231624
depends on SECURITY
16241625
depends on BPF_JIT

0 commit comments

Comments
 (0)