bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next] bpf: lsm: Make BPF_LSM depend on BPF_EVENTS
@ 2020-03-30 20:40 KP Singh
  2020-03-30 21:00 ` Daniel Borkmann
  0 siblings, 1 reply; 3+ messages in thread
From: KP Singh @ 2020-03-30 20:40 UTC (permalink / raw)
  To: linux-kernel, bpf; +Cc: Randy Dunlap, Alexei Starovoitov, Daniel Borkmann

From: KP Singh <kpsingh@google.com>

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.

Signed-off-by: KP Singh <kpsingh@google.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: fc611f47f218 ("bpf: Introduce BPF_PROG_TYPE_LSM")
---
 init/Kconfig | 1 +
 1 file changed, 1 insertion(+)

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
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-30 21:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-30 20:40 [PATCH bpf-next] bpf: lsm: Make BPF_LSM depend on BPF_EVENTS KP Singh
2020-03-30 21:00 ` Daniel Borkmann
2020-03-30 21:01   ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).