]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, lsm: Make BPF_LSM depend on BPF_EVENTS
authorKP Singh <kpsingh@google.com>
Mon, 30 Mar 2020 20:40:59 +0000 (22:40 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 30 Mar 2020 20:57:23 +0000 (22:57 +0200)
commitb770d8836f3ec03c8f952132497e64140205dff4
treeee2e63b9471143ed78dca3db4b7bed72d2f33028
parent8eb71ee36999f5d6d65bcd63bf6d6165aa94edd7
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: 8cf194e9dc70 ("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
init/Kconfig