BPF List
 help / color / mirror / Atom feed
* [PATCH] bpf: Use an UNUSED id for bpf_session_cookie without FPROBE
@ 2024-05-29 12:44 Sebastian Andrzej Siewior
  2024-05-29 16:18 ` Alexei Starovoitov
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2024-05-29 12:44 UTC (permalink / raw)
  To: bpf
  Cc: Jiri Olsa, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Stanislav Fomichev, Hao Luo, Viktor Malik,
	Masami Hiramatsu (Google), Thomas Gleixner

bpf_session_cookie() is only available with CONFIG_FPROBE=y leading to
an unresolved symbol otherwise.

Use BTF_ID_UNUSED instead of bpf_session_cookie for CONFIG_FPROBE=n.

Fixes: 5c919acef8514 ("bpf: Add support for kprobe session cookie")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 kernel/bpf/verifier.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 77da1f438becc..436f72bfcb9b9 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -11124,7 +11124,11 @@ BTF_ID(func, bpf_iter_css_task_new)
 #else
 BTF_ID_UNUSED
 #endif
+#ifdef CONFIG_FPROBE
 BTF_ID(func, bpf_session_cookie)
+#else
+BTF_ID_UNUSED
+#endif
 
 static bool is_kfunc_ret_null(struct bpf_kfunc_call_arg_meta *meta)
 {
-- 
2.45.1


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

end of thread, other threads:[~2024-05-31  7:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-29 12:44 [PATCH] bpf: Use an UNUSED id for bpf_session_cookie without FPROBE Sebastian Andrzej Siewior
2024-05-29 16:18 ` Alexei Starovoitov
2024-05-29 19:34   ` Jiri Olsa
2024-05-31  7:15     ` Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox