Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 868762 - dev-util/pahole-1.24: fails to build a BTF-enabled kernel: "load BTF from vmlinux: Invalid argument"
Summary: dev-util/pahole-1.24: fails to build a BTF-enabled kernel: "load BTF from vml...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthias Schwarzott
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-06 15:06 UTC by Holger Hoffstätte
Modified: 2023-01-14 15:34 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Hoffstätte 2022-09-06 15:06:27 UTC
Wanted to do some kernel building after upgrading and was suddenly faced with a failed genkernel run. Manual kernel build also failed, see below.
Downgrading to pahole-1.23 fixed it.


Reproducible: Always

Steps to Reproduce:
1. update to pahole-1.24
2. build kernel with BTF enabled (e.g. for bpftrace)
3. fail
Actual Results:  
  LD      vmlinux
  BTFIDS  vmlinux
FAILED: load BTF from vmlinux: Invalid argument
make: *** [Makefile:1168: vmlinux] Error 255
make: *** Deleting file 'vmlinux'


Expected Results:  
Successful build.
Comment 1 Holger Hoffstätte 2022-09-06 15:11:52 UTC
lkml thread: https://lore.kernel.org/bpf/20220825163538.vajnsv3xcpbhl47v@altlinux.org/
Comment 2 Larry the Git Cow gentoo-dev 2022-09-08 05:35:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7511864b0c1645468d0763760640c571226958f2

commit 7511864b0c1645468d0763760640c571226958f2
Author:     Matthias Schwarzott <zzam@gentoo.org>
AuthorDate: 2022-09-08 05:25:34 +0000
Commit:     Matthias Schwarzott <zzam@gentoo.org>
CommitDate: 2022-09-08 05:35:26 +0000

    dev-util/pahole: Mask version 1.24 due to kernel build break
    
    Bug: https://bugs.gentoo.org/868762
    Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>

 profiles/package.mask | 5 +++++
 1 file changed, 5 insertions(+)
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-10-28 12:15:38 UTC
Apparently today's 5.10.151 features a fix for pahole 1.24.  Don't know about other branches.
Comment 4 Holger Hoffstätte 2022-10-28 13:48:22 UTC
Thanks for the notice - I had forgotten about this, and indeed 6.0.6 just built without problems with an unmasked pahole-1.24. Looks like it was fixed in 6.0 and is now percolating to the stable trees.
What's the procedure to get this unmasked?
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-10-28 14:43:37 UTC
Let's wait for all kernels having the fix to be stable, and old versions to be gone first.
Comment 6 Holger Hoffstätte 2023-01-14 14:36:08 UTC
As far as I can tell the patch in question never made it into 4.x or 5.4 (or I missed it in the ChangeLogs), probably because 4.x don't have the affected BTF infrastructure to begin with.

5.4.228 does have CONFIG_DEBUG_INFO_BTF and builds correctly with pahole-1.24:

  CHK     include/generated/compile.h
  LD      vmlinux.o
  MODPOST vmlinux.o
  MODINFO modules.builtin.modinfo
  LD      .tmp_vmlinux.btf
  BTF     .btf.vmlinux.bin.o
  LD      .tmp_vmlinux.kallsyms1
  KSYM    .tmp_vmlinux.kallsyms1.o
  LD      .tmp_vmlinux.kallsyms2
  KSYM    .tmp_vmlinux.kallsyms2.o
  LD      vmlinux
  SORTEX  vmlinux
  SYSMAP  System.map
  Building modules, stage 2.
  MODPOST 689 modules

So it looks like we can unmask pahole-1.24 now.
Comment 7 Larry the Git Cow gentoo-dev 2023-01-14 15:25:47 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d609d27f2572d9f15f14bfaa4f15af823168c972

commit d609d27f2572d9f15f14bfaa4f15af823168c972
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-14 15:24:23 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-14 15:24:23 +0000

    profiles: unmask pahole
    
    The kernels in stable have been long-fixed.
    
    Closes: https://bugs.gentoo.org/868762
    Thanks-to: Holger Hoffstätte <holger@applied-asynchrony.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/package.mask | 5 -----
 1 file changed, 5 deletions(-)