Skip to content

Comments

kbuild: Require pahole >v1.29 with GENDWARFKSYMS and BTF on X86#65

Closed
modules-kpd-app[bot] wants to merge 2 commits intomodules-next_basefrom
series/946078=>modules-next
Closed

kbuild: Require pahole >v1.29 with GENDWARFKSYMS and BTF on X86#65
modules-kpd-app[bot] wants to merge 2 commits intomodules-next_basefrom
series/946078=>modules-next

Conversation

@modules-kpd-app
Copy link

Pull request for series with
subject: kbuild: Require pahole >v1.29 with GENDWARFKSYMS and BTF on X86
version: 1
url: https://patchwork.kernel.org/project/linux-modules/list/?series=946078

mcgrof and others added 2 commits March 18, 2025 22:56
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
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

The pahole commit that adds 0 address DWARF variable verification
was merged after v1.29 was released, so later versions of pahole
shouldn't have this issue. Require pahole >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: 085c5e3
series: https://patchwork.kernel.org/project/linux-modules/list/?series=946078
version: 1

@modules-kpd-app
Copy link
Author

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

@modules-kpd-app modules-kpd-app bot closed this Apr 7, 2025
@modules-kpd-app modules-kpd-app bot deleted the series/946078=>modules-next branch April 7, 2025 01:59
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.

2 participants