> Module BTF is split BTF against the vmlinux BTF and is parsed in the > module notifier. With CONFIG_DEBUG_INFO_BTF=m the vmlinux BTF may not be > loaded yet when a module loads, and the notifier cannot load btf_vmlinux > (that would nest a module load in a module load). > > So a module loaded before the vmlinux BTF keeps a copy of its .BTF and > .BTF.base and gets a list entry with btf == NULL; its kfunc, dtor kfunc > and struct_ops registrations wait on that entry. Without a .BTF.base > the data is final and is exposed in /sys/kernel/btf right away (the raw > bytes need no parsing); with one, parsing relocates the data in place, > so its file is created once parsed, as with =y. The next patch creates > that file earlier. > > When the vmlinux BTF arrives, btf_parse_deferred_modules() parses the > kept copies (the copy is the one btf_parse_module() makes anyway, so an > [ ... ] > With =y the BTF is present from boot and the notifier takes the existing > path. Still nothing is reachable until the Kconfig symbol becomes a > tristate. > > Signed-off-by: Jay Wang <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=7
