dwarves.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pahole split BTF support broken on 32bit builds?
@ 2022-07-10 13:43 Dominique Martinet
  2022-07-11  1:28 ` Dominique Martinet
  0 siblings, 1 reply; 2+ messages in thread
From: Dominique Martinet @ 2022-07-10 13:43 UTC (permalink / raw)
  To: dwarves, Arnaldo Carvalho de Melo

Hi Arnaldo,

I noticed nixos had to disable BTF for 5.15+ builds -- split BTF for
modules got in 5.11 and that's the first kernel after this so it matches
up.

I could reproduce by just building any kernel with ARCH=i386 and using a
32bit pahole

$ LD_LIBRARY_PATH=/tmp/pahole/build /tmp/pahole/build/pahole -J --btf_base vmlinux arch/x86/crypto/aesni-intel.ko
Failed to parse base BTF 'vmlinux': -22

$  file /tmp/pahole/build/pahole 
/tmp/pahole/build/pahole: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /nix/store/pp1yzf2flqnjm02jnjcgxhx015bhmi9j-glibc-2.34-210/lib/ld-linux.so.2, for GNU/Linux 2.6.32, with debug_info, not stripped


(64bit pahole works with the same input, and interestingly the 32bit
pahole works with a 64bit kernel/modules -- I can reproduce on either
5.15 or current master as long as it's built with ARCH=i686 though)


If cross-compiling pahole to i686 is a pain the issue apparently is
reproductible with native armhf builds as well according to comments on
the nixos PR:
https://github.com/NixOS/nixpkgs/pull/178256

I'm not attaching a config, a minimal .config with just BTF and module
BTF was enough for me (allnoconfig adjusted to get these)


Please let me know if you need any more information,
--
Dominique

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: pahole split BTF support broken on 32bit builds?
  2022-07-10 13:43 pahole split BTF support broken on 32bit builds? Dominique Martinet
@ 2022-07-11  1:28 ` Dominique Martinet
  0 siblings, 0 replies; 2+ messages in thread
From: Dominique Martinet @ 2022-07-11  1:28 UTC (permalink / raw)
  To: dwarves, Arnaldo Carvalho de Melo

Dominique Martinet wrote on Sun, Jul 10, 2022 at 10:43:42PM +0900:
> I could reproduce by just building any kernel with ARCH=i386 and using a
> 32bit pahole
> 
> $ LD_LIBRARY_PATH=/tmp/pahole/build /tmp/pahole/build/pahole -J --btf_base vmlinux arch/x86/crypto/aesni-intel.ko
> Failed to parse base BTF 'vmlinux': -22
> 
> $  file /tmp/pahole/build/pahole 
> /tmp/pahole/build/pahole: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /nix/store/pp1yzf2flqnjm02jnjcgxhx015bhmi9j-glibc-2.34-210/lib/ld-linux.so.2, for GNU/Linux 2.6.32, with debug_info, not stripped

Some more infos: this actually just got fixed by mistake when I changed
libbpf build to use elfutils instead of the old libelf

That was a side-product of the 0.8.0 upgrade which took a bit of time to
get merged, as that wouldn't build anymore with old libelf (can't
remember what, something missing)...

So, well, I guess it's probably not worth looking too far as that's
unlikely to be a problem again, and I'm not sure if libelf is still
maintained.


Sorry for the noise.
--
Dominique

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-11  1:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-10 13:43 pahole split BTF support broken on 32bit builds? Dominique Martinet
2022-07-11  1:28 ` Dominique Martinet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).