All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] bpf: Reject BTF ids with the same address in tracing_multi link
@ 2026-10-11 16:48 Alexei Starovoitov
  2026-10-11 16:48 ` [PATCH bpf-next 1/2] " Alexei Starovoitov
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Alexei Starovoitov @ 2026-10-11 16:48 UTC (permalink / raw)
  To: bpf; +Cc: daniel, andrii, eddyz87, memxor

From: Alexei Starovoitov <ast@kernel.org>

tracing_multi link accepts different BTF ids that resolve to the same
address. The attach succeeds, the detach fails in ftrace and the kernel
crashes in freed trampoline images.
'test_progs -t tracing_multi' hits it when the kernel is built with
CONFIG_DEBUG_INFO_BTF_INLINE. Without it the ids of aliased functions do
the same.

Patch 1 - the fix.
Patch 2 - selftest.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>

Alexei Starovoitov (2):
  bpf: Reject BTF ids with the same address in tracing_multi link
  selftests/bpf: Test tracing_multi link with BTF ids of the same
    address

 include/linux/ftrace.h                        |  1 +
 kernel/bpf/trampoline.c                       |  8 ++
 kernel/trace/trace.h                          |  3 -
 .../selftests/bpf/prog_tests/tracing_multi.c  | 99 +++++++++++++++++++
 4 files changed, 108 insertions(+), 3 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-10-12  8:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-11 16:48 [PATCH bpf-next 0/2] bpf: Reject BTF ids with the same address in tracing_multi link Alexei Starovoitov
2026-10-11 16:48 ` [PATCH bpf-next 1/2] " Alexei Starovoitov
2026-10-11 16:48 ` [PATCH bpf-next 2/2] selftests/bpf: Test tracing_multi link with BTF ids of the same address Alexei Starovoitov
2026-10-11 18:15   ` bot+bpf-ci
2026-10-11 18:45     ` Alexei Starovoitov
2026-10-12  4:59 ` [PATCH bpf-next 0/2] bpf: Reject BTF ids with the same address in tracing_multi link Leon Hwang
2026-10-12  5:30 ` patchwork-bot+netdevbpf
2026-10-12  8:26   ` Leon Hwang
2026-10-12  8:45     ` Kumar Kartikeya Dwivedi
2026-10-12  8:09 ` Jiri Olsa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.