From: Ihor Solodrai <ihor.solodrai@linux.dev>
To: bot+bpf-ci@kernel.org, ast@kernel.org, andrii@kernel.org,
daniel@iogearbox.net, eddyz87@gmail.com
Cc: alexis.lothore@bootlin.com, bpf@vger.kernel.org,
kernel-team@meta.com, martin.lau@kernel.org,
yonghong.song@linux.dev, clm@meta.com
Subject: Re: [PATCH bpf-next v1 1/2] bpf: Support struct btf_struct_meta via KF_IMPLICIT_ARGS
Date: Wed, 18 Mar 2026 15:48:05 -0700 [thread overview]
Message-ID: <1f87fb02-ba86-4615-9f64-d5146a133881@linux.dev> (raw)
In-Reply-To: <4641dd98f7a3a4f162c24c53e0b246ec5017d79b67cdf93486db2583039f24b2@mail.kernel.org>
On 3/12/26 1:05 PM, bot+bpf-ci@kernel.org wrote:
>> diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c
>> index cb6d242bd093..e5c8fb6596e7 100644
>> --- a/kernel/bpf/helpers.c
>> +++ b/kernel/bpf/helpers.c
>
> [ ... ]
>
>> +__bpf_kfunc void *bpf_percpu_obj_new(u64 local_type_id__k, struct btf_struct_meta *meta)
>> +{
>> + u64 size = local_type_id__k;
>> +
>> + /* The verifier has ensured that meta__ign must be NULL */
>> + return bpf_mem_alloc(&bpf_global_percpu_ma, size);
>> +}
>
> The parameter here is named "meta", not "meta__ign". Should this
> comment say "meta" instead?
>
> [ ... ]
>
>> +__bpf_kfunc void bpf_percpu_obj_drop(void *p__alloc, struct btf_struct_meta *meta)
>> +{
>> + /* The verifier has ensured that meta__ign must be NULL */
>> + bpf_mem_free_rcu(&bpf_global_percpu_ma, p__alloc);
>> +}
>
> Same here -- the comment references "meta__ign" but the parameter is
> "meta".
>
>> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
>> index 4fbacd2149cd..2e4f1e9b1d37 100644
>> --- a/kernel/bpf/verifier.c
>> +++ b/kernel/bpf/verifier.c
>
> [ ... ]
>
>> @@ -13575,12 +13658,12 @@ static int check_kfunc_args(struct bpf_verifier_env *env, struct bpf_kfunc_call_
>> case KF_ARG_PTR_TO_ALLOC_BTF_ID:
>> if (reg->type == (PTR_TO_BTF_ID | MEM_ALLOC)) {
>> - if (meta->func_id != special_kfunc_list[KF_bpf_obj_drop_impl]) {
>> + if (!is_bpf_obj_drop_kfunc(meta->func_id)) {
>> verbose(env, "arg#%d expected for bpf_obj_drop_impl()\n", i);
>> return -EINVAL;
>> }
>> } else if (reg->type == (PTR_TO_BTF_ID | MEM_ALLOC | MEM_PERCPU)) {
>> - if (meta->func_id != special_kfunc_list[KF_bpf_percpu_obj_drop_impl]) {
>> + if (!is_bpf_percpu_obj_drop_kfunc(meta->func_id)) {
>> verbose(env, "arg#%d expected for bpf_percpu_obj_drop_impl()\n", i);
>> return -EINVAL;
>> }
>
> The conditions now match both bpf_obj_drop and bpf_obj_drop_impl (and
> their percpu variants), but the error messages still reference only
> the _impl names. Would it make sense to update these to say
> "bpf_obj_drop" and "bpf_percpu_obj_drop" respectively, so that a
> developer calling the new variants sees the right function name in
> the error?
All valid nits. Lost this in my inbox before sending v2.
Will send a v3 soon.
>
>
> ---
> AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
> See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
>
> CI run summary: https://github.com/kernel-patches/bpf/actions/runs/23020502189
next prev parent reply other threads:[~2026-03-18 22:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 19:35 [PATCH bpf-next v1 1/2] bpf: Support struct btf_struct_meta via KF_IMPLICIT_ARGS Ihor Solodrai
2026-03-12 19:35 ` [PATCH bpf-next v1 2/2] selftests/bpf: Update kfuncs using btf_struct_meta to new variants Ihor Solodrai
2026-03-12 20:05 ` bot+bpf-ci
2026-03-18 22:34 ` Ihor Solodrai
2026-03-12 20:05 ` [PATCH bpf-next v1 1/2] bpf: Support struct btf_struct_meta via KF_IMPLICIT_ARGS bot+bpf-ci
2026-03-18 22:48 ` Ihor Solodrai [this message]
2026-03-12 21:24 ` Andrii Nakryiko
2026-03-12 22:42 ` Ihor Solodrai
2026-03-16 21:20 ` Andrii Nakryiko
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=1f87fb02-ba86-4615-9f64-d5146a133881@linux.dev \
--to=ihor.solodrai@linux.dev \
--cc=alexis.lothore@bootlin.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=kernel-team@meta.com \
--cc=martin.lau@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