You are not logged in.

#1 2020-12-25 15:01:03

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

libbpf error on booting a custom kernel... what am I missing

I built 5.10.2 using the distro provided config modifying it to remove debuging, specifically:

sed -i -e 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/' \
  -i -e '/CONFIG_DEBUG_INFO_DWARF4=y/d' \
  -i -e '/CONFIG_DEBUG_INFO_BTF=y/d' ./.config

Under the 5.9.x series, I saw no ill effect, however under 5.10.2, I am seeing the following and am curious why.  Did I miss another option that should also be removed?

libbpf: failed to find valid kernel BTF
libbpf: Error loading vmlinux BTF: -3
libbpf: failed to load object 'iterators_bpf'
libbpf: failed to load BPF skeleton 'iterators_bpf': -3
Failed to load could be due to wrong endianness

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#2 2020-12-25 16:57:24

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: libbpf error on booting a custom kernel... what am I missing

A web search found this: https://github.com/iovisor/bcc/issues/2872

Do you have "pahole" installed?


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

#3 2020-12-25 18:29:37

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: libbpf error on booting a custom kernel... what am I missing

I found that as well but I don't want the libbpf stuff at all.  Maybe I am misunderstanding the suggestion to have pahole present when building.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#4 2021-01-01 13:08:35

Nickolas0
Member
Registered: 2019-02-16
Posts: 30

Re: libbpf error on booting a custom kernel... what am I missing

Same issue affect linux-hardened kernel: https://bugs.archlinux.org/task/69155

Offline

#5 2021-01-02 01:30:29

Sinistar
Member
Registered: 2021-01-02
Posts: 11

Re: libbpf error on booting a custom kernel... what am I missing

one or all of these

CONFIG_BPF_LSM=y
CONFIG_BPF_PRELOAD=y
CONFIG_BPF_PRELOAD_UMD=m
CONFIG_BPF_LIRC_MODE2=y

just checked my standard .config against the repo, and those stand out.
compiled the repo version with those commented out and the error's go away.

The two preloads were added in 5.10.1 commit 282c90d1e14ef7dd0f56f8c8192ba1c830e906ad

Last edited by Sinistar (2021-01-02 17:32:06)

Offline

#6 2021-01-03 14:58:31

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: libbpf error on booting a custom kernel... what am I missing

See the changes I made here: https://aur.archlinux.org/cgit/aur.git/ … 5782beedfe

I went through nconfig and manually disabled anything I could that matched BPF.  I then wrote the sed stanza in the PKGBUILD I linked above.  Booted fine for me.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

Board footer

Powered by FluxBB