Re: [PATCH bpf-next v3 8/9] bpf, trace, net: prepare CONFIG_DEBUG_INFO_BTF checks for a tristate
From: Jay Wang
Date: Thu Oct 01 2026 - 19:53:08 EST
Right, fixed in v4 (patch 5/12, with the other tracefs and bpffs
requests that load the BTF):
https://lore.kernel.org/bpf/20261001225214.12351-1-wanjay@xxxxxxxxxx/
event_btf_ids_read() now calls bpf_load_btf_vmlinux() before it takes
event_mutex, so the btf_vmlinux module load and its trace notifier run
without it; btf_get_module_btf(NULL) under the mutex then finds the BTF
already parsed. More generally, in v4 the lookups themselves never load
the BTF any more (see the reply to Alexei on 4/9): the probe argument
parser (PROBE_EVENTS_BTF_ARGS) loads it explicitly, holding only
dyn_event_ops_mutex, which loading a module never takes. Tested by
reading events/sched/sched_switch/btf_ids, and by creating kprobe events
with BTF arguments, each as the first BTF user after boot.
Jay