BPF List
 help / color / mirror / Atom feed
* [PATCH] [v2] bpf: make bpf_session_is_return() reference optional
@ 2026-05-15 11:32 Arnd Bergmann
  2026-05-15 17:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2026-05-15 11:32 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Eduard Zingerman, Kumar Kartikeya Dwivedi, Menglong Dong
  Cc: Arnd Bergmann, John Fastabend, Martin KaFai Lau, Song Liu,
	Yonghong Song, Jiri Olsa, Puranjay Mohan, Anton Protopopov,
	Mykyta Yatsenko, bpf, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Building without CONFIG_BPF_EVENTS produces a build-time
warning:

WARN: resolve_btfids: unresolved symbol bpf_session_is_return

The function is actually defined in kernel/trace/bpf_trace.o,
which is built conditionally based on configuration.

Make the reference to this function conditional as well,
as is already done in the bpf verifier for other functions.

Fixes: 8fe4dc4f6456 ("bpf: change prototype of bpf_session_{cookie,is_return}")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: fix patch title
---
 kernel/bpf/verifier.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 03f9e16c2abe..a5139f45e366 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -10882,7 +10882,11 @@ BTF_ID(func, bpf_task_work_schedule_resume)
 BTF_ID(func, bpf_arena_alloc_pages)
 BTF_ID(func, bpf_arena_free_pages)
 BTF_ID(func, bpf_arena_reserve_pages)
+#ifdef CONFIG_BPF_EVENTS
 BTF_ID(func, bpf_session_is_return)
+#else
+BTF_ID_UNUSED
+#endif
 BTF_ID(func, bpf_stream_vprintk)
 BTF_ID(func, bpf_stream_print_stack)
 
-- 
2.39.5


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

* Re: [PATCH] [v2] bpf: make bpf_session_is_return() reference optional
  2026-05-15 11:32 [PATCH] [v2] bpf: make bpf_session_is_return() reference optional Arnd Bergmann
@ 2026-05-15 17:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-05-15 17:00 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: ast, daniel, andrii, eddyz87, memxor, menglong8.dong, arnd,
	john.fastabend, martin.lau, song, yonghong.song, jolsa, puranjay,
	a.s.protopopov, yatsenko, bpf, linux-kernel

Hello:

This patch was applied to bpf/bpf.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Fri, 15 May 2026 13:32:32 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Building without CONFIG_BPF_EVENTS produces a build-time
> warning:
> 
> WARN: resolve_btfids: unresolved symbol bpf_session_is_return
> 
> [...]

Here is the summary with links:
  - [v2] bpf: make bpf_session_is_return() reference optional
    https://git.kernel.org/bpf/bpf/c/a828abbb8976

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2026-05-15 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-15 11:32 [PATCH] [v2] bpf: make bpf_session_is_return() reference optional Arnd Bergmann
2026-05-15 17:00 ` patchwork-bot+netdevbpf

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