All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Hwang <leon.hwang@linux.dev>
To: bot+bpf-ci@kernel.org, bpf@vger.kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com,
	andrii@kernel.org, martin.lau@linux.dev, eddyz87@gmail.com,
	memxor@gmail.com, song@kernel.org, yonghong.song@linux.dev,
	jolsa@kernel.org, shuah@kernel.org, yuyanghuang@google.com,
	kpsingh@kernel.org, sdf@fomichev.me,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	kernel-patches-bot@fb.com, martin.lau@kernel.org, clm@meta.com,
	ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next 2/3] bpf: Check tail zero of bpf_prog_info
Date: Thu, 4 Jun 2026 10:24:40 +0800	[thread overview]
Message-ID: <9fb5840e-fb05-4c9c-b6d6-73455a30e244@linux.dev> (raw)
In-Reply-To: <d4a64c5dffb0ebedc7460a21a52f2d94af931fda6c21d039bd71327a4cf79fce@mail.kernel.org>

On 3/6/26 23:37, bot+bpf-ci@kernel.org wrote:
>> Fix it by changing sizeof(info) to
>> offsetofend(struct bpf_prog_info, attach_btf_id).
>>
>> Fixes: b79c9fc9551b ("bpf: implement BPF_PROG_QUERY for BPF_LSM_CGROUP")
> 
> Is this the right commit for the Fixes: tag?
> 
> The change avoids the trailing padding that exists because struct
> bpf_prog_info has 4 bytes of padding at its end, so sizeof(info) (232)
> differs from offsetofend(struct bpf_prog_info, attach_btf_id) (228).
> 
> That trailing padding first appeared when __u32 verified_insns was
> appended after the last __u64 member (recursion_misses).  Before that,
> the struct ended on an 8-byte-aligned member and had no trailing
> padding.
> 
> b79c9fc9551b only appended two further __u32 fields (attach_btf_obj_id,
> attach_btf_id), while the 4-byte trailing padding already existed and
> was unchanged.
> 
> Would this be more accurate?
> 
>   Fixes: aba64c7da983 ("bpf: Add verified_insns to bpf_prog_info and fdinfo")
> 
> 
Agreed.

Will update the Fixes tag in the next revision.

Thanks,
Leon


  reply	other threads:[~2026-06-04  2:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 14:45 [PATCH bpf-next 0/3] bpf: Check tail zero of bpf_map_info and bpf_prog_info Leon Hwang
2026-06-03 14:45 ` [PATCH bpf-next 1/3] bpf: Check tail zero of bpf_map_info Leon Hwang
2026-06-03 15:16   ` Mykyta Yatsenko
2026-06-03 14:45 ` [PATCH bpf-next 2/3] bpf: Check tail zero of bpf_prog_info Leon Hwang
2026-06-03 15:14   ` sashiko-bot
2026-06-04  2:23     ` Leon Hwang
2026-06-03 15:17   ` Mykyta Yatsenko
2026-06-03 15:37   ` bot+bpf-ci
2026-06-04  2:24     ` Leon Hwang [this message]
2026-06-03 14:45 ` [PATCH bpf-next 3/3] selftests/bpf: Add tests to verify checking padding bytes for bpf_[map,prog]_info Leon Hwang

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=9fb5840e-fb05-4c9c-b6d6-73455a30e244@linux.dev \
    --to=leon.hwang@linux.dev \
    --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=ihor.solodrai@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kernel-patches-bot@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    --cc=yuyanghuang@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.