Files
linux/include
Mykyta Yatsenko d5b201ed4f tracing: Make per-template BTF id lists file-local
DECLARE_EVENT_CLASS emitted __bpf_trace_btf_ids_<call> through
BTF_ID_LIST_GLOBAL, i.e. a global symbol named after the event class.
The class name is not unique across the kernel, so the symbol
multiply-defines whenever two translation units instantiate the same
class.

Switch to the file-local BTF_ID_LIST: the list is reached
only through the event_class_<call>.btf_ids pointer, initialised in the
same unit, so tracefs readers never reference the symbol by name and
resolve_btfids still fills the now-local .BTF_ids entries.

The handcrafted syscall classes are the one cross-unit consumer: give
them their own local BTF_ID_LIST rather than importing the generated
sys_{enter,exit} lists.

Link: https://patch.msgid.link/[email protected]
Fixes: eadc0725ab ("tracing: Expose tracepoint BTF ids via tracefs")
Reported-by: Mark Brown <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Mykyta Yatsenko <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
2026-08-05 22:02:29 -04:00
..
…
…
…
…
…
…
…
…
…