> diff --git a/kernel/btf/bpf.c b/kernel/btf/bpf.c
> new file mode 100644
> index 0000000000000..ef973771bb2ab
> --- /dev/null
> +++ b/kernel/btf/bpf.c
[ ... ]
> +struct btf_struct_ops_tab {
> + u32 cnt;
> + u32 capacity;
> + struct bpf_struct_ops_desc ops[];
> +};
> + u32 id;
> + struct rcu_head rcu;
> + struct btf_kfunc_set_tab *kfunc_set_tab;
> + struct btf_id_dtor_kfunc_tab *dtor_kfunc_tab;
> + struct btf_struct_metas *struct_meta_tab;
> + struct btf_struct_ops_tab *struct_ops_tab;
> +s32 bpf_find_btf_id(const char *name, u32 kind, struct btf **btf_p)
These six declarations between the closing brace of struct
btf_struct_ops_tab and bpf_find_btf_id() appear to be orphaned
fields from the original struct btf definition that were left
behind during the split.
They are parsed as file-scope global variable definitions. With
-fno-common, the name "id" in particular is likely to collide at
link time. Were these meant to be removed here, given that they
already appear correctly inside struct btf in kernel/btf/btf.h
under the CONFIG_BPF_SYSCALL guard?
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 93f356d2b3d95..0009a7ac78462 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -395,14 +395,23 @@ config DEBUG_INFO_SPLIT
[ ... ]
> +config BTF
> + bool "BTF type information support"
> + depends on !DEBUG_INFO_SPLIT && !DEBUG_INFO_REDUCED
> + depends on !GCC_PLUGIN_RANDSTRUCT || COMPILE_TEST
> + depends on PAHOLE_VERSION >= 122
> + # pahole uses elfutils, which does not have support for Hexagon
> relocations
> + depends on !HEXAGON
[ ... ]
> +config DEBUG_INFO_BTF
> + bool "Generate BTF type information"
> + select BTF
The old DEBUG_INFO_BTF had its own depends on lines:
depends on !DEBUG_INFO_SPLIT && !DEBUG_INFO_REDUCED
depends on !GCC_PLUGIN_RANDSTRUCT || COMPILE_TEST
depends on BPF_SYSCALL
depends on PAHOLE_VERSION >= 122
depends on !HEXAGON
Those constraints now live only on CONFIG_BTF, and DEBUG_INFO_BTF
uses "select BTF" with no depends of its own. Since select bypasses
the selected symbol's depends-on checks, DEBUG_INFO_BTF is now
visible and selectable even when BTF's dependencies are not met
(e.g. on Hexagon, or with PAHOLE_VERSION < 122).
Should DEBUG_INFO_BTF use "depends on BTF" instead of (or in
addition to) "select BTF", so that it inherits the same
constraints?
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/23520643445