From: Bixuan Cui <cuibixuan@vivo.com>
To: Alan Maguire <alan.maguire@oracle.com>,
Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, eddyz87@gmail.com, song@kernel.org,
yonghong.song@linux.dev, john.fastabend@gmail.com,
kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com,
jolsa@kernel.org
Subject: Re: [PATCH bpf-next] libbpf: Ignore the modules that failed to load BTF object
Date: Wed, 29 Oct 2025 09:35:51 +0800 [thread overview]
Message-ID: <b2b8eda3-2b36-4784-a4b2-1275f3a26e43@vivo.com> (raw)
In-Reply-To: <5f7583bd-2b62-46a3-b500-35c33111accb@oracle.com>
在 2025/10/29 2:21, Alan Maguire 写道:
>> It's not an expected condition to have kernel module with corrupted
>> BTF, so I don't think we should be doing this.
>>
>> pw-bot: cr
>>
> Would be good to understand this failure better. If the module is being
> built out-of-tree with relatively new pahole, it will have a .BTF.base
> section and a .BTF section; the .BTF.base section allows the module to
> carry stable references to vmlinux BTF types which then get fixed up to
> the real vmlinux BTF id references when the module is loaded. It is
> possible there are bugs in that code however, so it woul be good to
> figure that out. bpftool should dump BTF for your module using the
> .BTF.base section as base, so
>
> bpftool btf dump file mymod.ko
>
> should work (provided "objdump -h mymod.ko" shows a .BTF.base and .BTF
> section). If it does, the BTF id relocation may be breaking and we
> might need to do further digging to understand where. It should relocate
> BTF kfunc ids also, but again there may be a bug lurking here.
>
> If the BTF is loading into the kernel, comparing
>
> bpftool btf dump -B /sys/kernel/btf file /sys/kernel/btf/mymod
>
> ...to the .ko BTF would be valuable.
>
> If your module only has a .BTF section and no .BTF.base section, it is
> possible it did not get (re)built against an updated vmlinux and has
> outdated type id references as a result.
Thank you, I will first look at the error reported by this module.
Bixuan Cui
prev parent reply other threads:[~2025-10-29 1:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 13:57 Bixuan Cui
2025-10-28 18:05 ` Andrii Nakryiko
2025-10-28 18:21 ` Alan Maguire
2025-10-29 1:35 ` Bixuan Cui [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b2b8eda3-2b36-4784-a4b2-1275f3a26e43@vivo.com \
--to=cuibixuan@vivo.com \
--cc=alan.maguire@oracle.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®