Skip to content

Comments

kbuild: Require pahole <v1.28 or >v1.29 with GENDWARFKSYMS on X86#68

Closed
modules-kpd-app[bot] wants to merge 1 commit intomodules-next_basefrom
series/950835=>modules-next
Closed

kbuild: Require pahole <v1.28 or >v1.29 with GENDWARFKSYMS on X86#68
modules-kpd-app[bot] wants to merge 1 commit intomodules-next_basefrom
series/950835=>modules-next

Conversation

@modules-kpd-app
Copy link

Pull request for series with
subject: kbuild: Require pahole <v1.28 or >v1.29 with GENDWARFKSYMS on X86
version: 2
url: https://patchwork.kernel.org/project/linux-modules/list/?series=950835

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>
@modules-kpd-app
Copy link
Author

Upstream branch: b464e57
series: https://patchwork.kernel.org/project/linux-modules/list/?series=950835
version: 2

@modules-kpd-app
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/linux-modules/list/?series=950835 irrelevant now. Closing PR.

@modules-kpd-app modules-kpd-app bot closed this Apr 14, 2025
@modules-kpd-app modules-kpd-app bot deleted the series/950835=>modules-next branch April 14, 2025 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant