From: Yonghong Song <yonghong.song@linux.dev>
To: bot+bpf-ci@kernel.org, bpf@vger.kernel.org
Cc: ast@kernel.org, andrii@kernel.org, daniel@iogearbox.net,
eddyz87@gmail.com, kernel-team@fb.com, martin.lau@kernel.org,
mason@kernel.org, ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next v2 02/12] bpf: Index global function arguments by argument slot
Date: Thu, 10 Sep 2026 21:27:06 -0700 [thread overview]
Message-ID: <f305d666-e649-4b68-a34c-f81b2db6091b@linux.dev> (raw)
In-Reply-To: <015098d2b080372b27acd82b6bea918f3762ba1c4f49a8c26ca273842ba67547@mail.kernel.org>
On 9/9/26 12:13 AM, bot+bpf-ci@kernel.org wrote:
>> diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
>> index 31057c8f3a7c..104a91f5ffd5 100644
>> --- a/kernel/bpf/btf.c
>> +++ b/kernel/bpf/btf.c
>> @@ -8037,7 +8037,7 @@ int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog)
>> const struct btf_param *args;
>> const struct btf_type *t, *ref_t, *fn_t;
>> int err;
>> - u32 i, nargs, btf_id;
>> + u32 i, slots_used, nargs, btf_id;
>> const char *tname;
> [ ... ]
>
>> args = (const struct btf_param *)(t + 1);
>> nargs = btf_type_vlen(t);
>> sub->arg_cnt = nargs;
> [ ... ]
>
>> @@ -8122,8 +8122,9 @@ int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog)
>> /* Convert BTF function arguments into verifier types.
>> * Only PTR_TO_CTX and SCALAR are supported atm.
>> */
>> - for (i = 0; i < nargs; i++) {
>> + for (i = 0, slots_used = 0; i < nargs; i++) {
>> u32 tags = 0;
>> +
> [ ... ]
>
>> @@ -8254,6 +8260,8 @@ int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog)
>> return -EINVAL;
>> }
>>
>> + sub->arg_cnt = slots_used;
>> +
> This isn't a bug, but would a short comment on the early 'sub->arg_cnt =
> nargs;' noting that it exists only so the error path in
> btf_check_func_arg_match() has a stack-arg count, and that the
> authoritative slot count is set after the loop, make the two meanings of
> arg_cnt easier to keep straight in the later patches?
I will rename arg_cnt to arg_slot_cnt to make it clear.
>
>> sub->args_cached = true;
>>
>> return 0;
>
> ---
> 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/34320399441
next prev parent reply other threads:[~2026-09-11 4:27 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 6:25 [PATCH bpf-next v2 00/12] bpf: Support by-value struct and __int128 arguments Yonghong Song
2026-09-09 6:25 ` [PATCH bpf-next v2 01/12] selftests/bpf: Add a test for an __int128 by-value argument Yonghong Song
2026-09-09 7:13 ` bot+bpf-ci
2026-09-11 4:25 ` Yonghong Song
2026-09-09 6:25 ` [PATCH bpf-next v2 02/12] bpf: Index global function arguments by argument slot Yonghong Song
2026-09-09 7:13 ` bot+bpf-ci
2026-09-11 4:27 ` Yonghong Song [this message]
2026-09-09 6:25 ` [PATCH bpf-next v2 03/12] bpf: Support by-value struct arguments up to 16 bytes Yonghong Song
2026-09-09 7:13 ` bot+bpf-ci
2026-09-11 4:29 ` Yonghong Song
2026-09-09 6:25 ` [PATCH bpf-next v2 04/12] bpf: Support __int128 as a by-value function argument Yonghong Song
2026-09-09 6:25 ` [PATCH bpf-next v2 05/12] bpf: Rename bpf_call_summary::num_params to arg_slot_cnt Yonghong Song
2026-09-09 6:25 ` [PATCH bpf-next v2 06/12] bpf: Recognize by-value struct and __int128 kfunc arguments Yonghong Song
2026-09-09 6:46 ` sashiko-bot
2026-09-11 4:31 ` Yonghong Song
2026-09-09 6:25 ` [PATCH bpf-next v2 07/12] bpf: Prepare kfunc arguments for the JIT from an ABI description Yonghong Song
2026-09-09 6:46 ` sashiko-bot
2026-09-11 5:05 ` Yonghong Song
2026-09-09 6:26 ` [PATCH bpf-next v2 08/12] bpf, x86: Move kfunc arguments into the x86-64 calling convention Yonghong Song
2026-09-09 7:29 ` bot+bpf-ci
2026-09-11 5:32 ` Yonghong Song
2026-09-09 6:26 ` [PATCH bpf-next v2 09/12] bpf, arm64: Move kfunc arguments into the arm64 " Yonghong Song
2026-09-09 7:30 ` bot+bpf-ci
2026-09-11 5:34 ` Yonghong Song
2026-09-09 6:26 ` [PATCH bpf-next v2 10/12] selftests/bpf: Add C tests for by-value arguments up to 16 bytes Yonghong Song
2026-09-09 6:26 ` [PATCH bpf-next v2 11/12] selftests/bpf: Add inline-asm tests for by-value arguments Yonghong Song
2026-09-09 7:30 ` bot+bpf-ci
2026-09-11 5:37 ` Yonghong Song
2026-09-09 6:26 ` [PATCH bpf-next v2 12/12] selftests/bpf: Add tests for by-value kfunc arguments Yonghong Song
2026-09-09 7:30 ` bot+bpf-ci
2026-09-11 5:57 ` Yonghong Song
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=f305d666-e649-4b68-a34c-f81b2db6091b@linux.dev \
--to=yonghong.song@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bot+bpf-ci@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=ihor.solodrai@linux.dev \
--cc=kernel-team@fb.com \
--cc=martin.lau@kernel.org \
--cc=mason@kernel.org \
/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.