From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: <sashiko@lists.linux.dev>, "Nick Hudson" <nhudson@akamai.com>
Cc: <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next v4 1/6] bpf: name the enum for BPF_FUNC_skb_adjust_room flags
Date: Thu, 16 Apr 2026 07:18:48 -0700 [thread overview]
Message-ID: <DHUN7O2WOLPC.107WH88I4E15I@gmail.com> (raw)
In-Reply-To: <20260416100225.178D6C2BCAF@smtp.kernel.org>
On Thu Apr 16, 2026 at 3:02 AM PDT, sashiko-bot wrote:
> Sashiko AI review found 1 potential issue(s):
> - [Medium] The newly named `enum bpf_adj_room_flags` will not be emitted into the kernel's BTF, rendering the intended CO-RE lookups non-functional.
> --
>
> commit d9be60117de7ebbae2642c8a29e31a5aa11ff502
> Author: Nick Hudson <nhudson@akamai.com>
>
> bpf: name the enum for BPF_FUNC_skb_adjust_room flags
>
> This commit names the previously anonymous enum for BPF_FUNC_skb_adjust_room
> flags to bpf_adj_room_flags. The stated goal is to enable CO-RE lookups in
> BPF programs.
>
>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
>> index c8d400b7680a8..bc4b25eb72ce5 100644
>> --- a/include/uapi/linux/bpf.h
>> +++ b/include/uapi/linux/bpf.h
>> @@ -6209,7 +6209,7 @@ enum {
>> };
>>
>> /* BPF_FUNC_skb_adjust_room flags. */
>> -enum {
>> +enum bpf_adj_room_flags {
>
> Since this enum is only declared in the UAPI header and never actually used as
> a variable, parameter, or struct field type in the kernel C code, will the
> compiler generate DWARF debug information for it?
>
> If it is omitted from the DWARF info, pahole will not emit it into the
> vmlinux BTF. This causes libbpf CO-RE checks for these values to silently
> evaluate to false regardless of the kernel version, which seems to defeat the
> purpose of this patch.
>
> Does the kernel need to explicitly force the emission of this type into the
> target BTF, for example by using BTF_TYPE_EMIT(enum bpf_adj_room_flags) in a
> compiled C file?
Nick,
take bots feedback with a grain of salt.
I suspect the bot is wrong here, but do you homework.
next parent reply other threads:[~2026-04-16 14:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260416075514.927101-2-nhudson@akamai.com>
[not found] ` <20260416100225.178D6C2BCAF@smtp.kernel.org>
2026-04-16 14:18 ` Alexei Starovoitov [this message]
2026-04-17 11:44 ` [PATCH bpf-next v4 1/6] bpf: name the enum for BPF_FUNC_skb_adjust_room flags Hudson, Nick
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=DHUN7O2WOLPC.107WH88I4E15I@gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=nhudson@akamai.com \
--cc=sashiko@lists.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