From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: <bot+bpf-ci@kernel.org>, <sidnayyar@google.com>,
<andrii@kernel.org>, <eddyz87@gmail.com>, <ast@kernel.org>,
<daniel@iogearbox.net>, <martin.lau@linux.dev>,
<memxor@gmail.com>, <song@kernel.org>, <yonghong.song@linux.dev>,
<jolsa@kernel.org>
Cc: <bpf@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<gprocida@google.com>, <maennich@google.com>,
<martin.lau@kernel.org>, <clm@meta.com>,
<ihor.solodrai@linux.dev>
Subject: Re: [PATCH v4 1/3] libbpf: load vmlinux BTF in gen_loader mode for struct_ops
Date: Wed, 27 May 2026 07:17:17 -0700 [thread overview]
Message-ID: <DITIUUJ1PNU5.26Z6XGZ2GQG2R@gmail.com> (raw)
In-Reply-To: <556048bab0cc9bda9a7dfe2d041308d35eed943c9295aeabd69d34414e2a9f4c@mail.kernel.org>
On Wed May 27, 2026 at 6:39 AM PDT, bot+bpf-ci wrote:
>> commit 29cedaf6d7d80a7e880a2e639f40fbafcbaf2e65
>> Author: Siddharth Nayyar <sidnayyar@google.com>
>> Date: Wed May 27 12:52:57 2026 +0000
>>
>> libbpf: load vmlinux BTF in gen_loader mode for struct_ops
>>
>> During light skeleton generation (`bpftool gen skeleton -L`), libbpf
>> runs in gen_loader mode. Previously, `bpf_object__load_vmlinux_btf()`
>> completely bypassed loading the kernel vmlinux BTF (`obj->btf_vmlinux`)
>> if `gen_loader` was active.
>>
>> However, BPF `struct_ops` maps (such as `sched_ext_ops` maps) require
>> resolving the kernel-side struct type IDs and member sizes at
>> compile/skeleton generation time. Without loading `btf_vmlinux`, libbpf
>> cannot query the kernel BTF types, causing light skeleton generation for
>> `struct_ops` to fail or omit crucial type information.
>>
>> Fix this by modifying the check to load `btf_vmlinux` even in
>> `gen_loader` mode if the BPF object contains `struct_ops` maps.
>>
>> Signed-off-by: Siddharth Nayyar <sidnayyar@google.com>
>
> Alexei Starovoitov requested in v3 review that a selftest be added to
> prove struct_ops light skeletons work end-to-end:
>
> "The selftest is mandatory to prove that."
> https://lore.kernel.org/bpf/CAADnVQ+AA_fmRw7uRwdL2TMyMbpWeebOQKb=0wvpKiQR6Ee5xQ@mail.gmail.com/
>
> This requirement has not been addressed in v4. Should a selftest be added
> to demonstrate that struct_ops light skeletons work correctly with this
> change?
thanks bot.
pw-bot: cr
next prev parent reply other threads:[~2026-05-27 14:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 12:52 [PATCH v4 0/3] libbpf: support STRUCT_OPS in light skeletons Siddharth Nayyar
2026-05-27 12:52 ` [PATCH v4 1/3] libbpf: load vmlinux BTF in gen_loader mode for struct_ops Siddharth Nayyar
2026-05-27 13:25 ` sashiko-bot
2026-05-27 13:39 ` bot+bpf-ci
2026-05-27 14:17 ` Alexei Starovoitov [this message]
2026-05-27 12:52 ` [PATCH v4 2/3] libbpf: zero out btf_key_type_id for STRUCT_OPS maps Siddharth Nayyar
2026-05-27 13:39 ` bot+bpf-ci
2026-05-27 12:52 ` [PATCH v4 3/3] libbpf: plumb btf_vmlinux_value_type_id and btf_fd in gen_loader Siddharth Nayyar
2026-05-27 13:39 ` bot+bpf-ci
2026-05-27 14:10 ` sashiko-bot
2026-05-27 14:27 ` Sid Nayyar
2026-05-28 21:35 ` [PATCH v4 0/3] libbpf: support STRUCT_OPS in light skeletons Andrii Nakryiko
2026-05-29 10:31 ` Sid Nayyar
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=DITIUUJ1PNU5.26Z6XGZ2GQG2R@gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bot+bpf-ci@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=clm@meta.com \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=gprocida@google.com \
--cc=ihor.solodrai@linux.dev \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maennich@google.com \
--cc=martin.lau@kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=sidnayyar@google.com \
--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