bpf: lsm: Make BPF_LSM depend on BPF_EVENTS
PATCH 1/1 bpf: lsm: Make BPF_LSM depend on BPF_EVENTS
From: KP Singh <[email protected]>
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.
--- init/Kconfig | 1 + 1 file changed, 1 insertion(+)
init/Kconfig +1 -0
@@ -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
Signature · 1 line
2.20.1
Quoted 5 lines · KP Singh
From: KP Singh <[email protected]>
LSM and tracing programs share their helpers with
bpf_tracing_func_protowhich is only defined (inbpf_trace.c) whenBPF_EVENTSis enabled.
Quoted 7 lines
Instead of adding
__weaksymbol, makeBPF_LSMdepend onBPF_EVENTSso that both tracing and LSM programs can actually share helpers.Signed-off-by KP Singh <[email protected]>Reported-by Randy Dunlap <[email protected]>Fixes fc611f47f218 ("bpf: Introduce BPF_PROG_TYPE_LSM")
Applied, thanks!
Randy Dunlap
Acked-byQuoted 10 lines · Daniel Borkmann
Quoted 9 lines · KP Singh
From: KP Singh <[email protected]>
LSM and tracing programs share their helpers with
bpf_tracing_func_protowhich is only defined (inbpf_trace.c) whenBPF_EVENTSis enabled.Instead of adding
__weaksymbol, makeBPF_LSMdepend onBPF_EVENTSso that both tracing and LSM programs can actually share helpers.
Quoted 5 lines
Quoted 3 lines
Signed-off-by KP Singh <[email protected]>Reported-by Randy Dunlap <[email protected]>Fixes fc611f47f218 ("bpf: Introduce BPF_PROG_TYPE_LSM")Applied, thanks!
thanks.
Signature · 1 line
~Randy