linux-yocto/kernel/module
Sami Tolvanen 9520a2b3f0 kbuild: Require pahole <v1.28 or >v1.29 with GENDWARFKSYMS on X86
With CONFIG_GENDWARFKSYMS, __gendwarfksyms_ptr variables are
added to the kernel in EXPORT_SYMBOL() to ensure DWARF type
information is available for exported symbols in the TUs where
they're actually exported. These symbols are dropped when linking
vmlinux, but dangling references to them remain in DWARF.

With CONFIG_DEBUG_INFO_BTF enabled on X86, pahole versions after
commit 47dcb534e253 ("btf_encoder: Stop indexing symbols for
VARs") and before commit 9810758003ce ("btf_encoder: Verify 0
address DWARF variables are in ELF section") place these symbols
in the .data..percpu section, which results in an "Invalid
offset" error in btf_datasec_check_meta() during boot, as all
the variables are at zero offset and have non-zero size. If
CONFIG_DEBUG_INFO_BTF_MODULES is enabled, this also results in a
failure to load modules with:

  failed to validate module [$module] BTF: -22

As the issue occurs in pahole v1.28 and the fix was merged
after v1.29 was released, require pahole <v1.28 or >v1.29 when
GENDWARFKSYMS is enabled with DEBUG_INFO_BTF on X86.

Reported-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-05-12 15:03:16 +09:00
..
debug_kmemleak.c module: prepare to handle ROX allocations for text 2024-11-07 14:25:15 -08:00
decompress.c
dups.c remove pointless includes of <linux/fdtable.h> 2024-10-07 13:34:41 -04:00
internal.h module: Allow __module_address() to be called from RCU section. 2025-03-10 11:54:45 +01:00
kallsyms.c module: Use RCU in all users of __module_address(). 2025-03-10 11:54:45 +01:00
Kconfig kbuild: Require pahole <v1.28 or >v1.29 with GENDWARFKSYMS on X86 2025-05-12 15:03:16 +09:00
kdb.c
kmod.c remove pointless includes of <linux/fdtable.h> 2024-10-07 13:34:41 -04:00
livepatch.c
main.c ring-buffer updates for v6.15 2025-03-31 13:37:22 -07:00
Makefile module: Fix KCOV-ignored file name 2024-08-08 17:36:35 +02:00
procfs.c
signing.c
stats.c
strict_rwx.c module: switch to execmem API for remapping as RW and restoring ROX 2025-02-03 11:46:02 +01:00
sysfs.c Driver core and debugfs updates 2025-01-28 12:25:12 -08:00
tracking.c module: Remove module_assert_mutex_or_preempt() from try_add_tainted_module(). 2025-03-10 11:54:44 +01:00
tree_lookup.c module: Begin to move from RCU-sched to RCU. 2025-03-10 11:54:43 +01:00
version.c module: Use RCU in find_symbol(). 2025-03-10 11:54:44 +01:00