Re: [PATCH bpf-next v4 04/18] bpf: Refactor to handle memory and size together

Yonghong Song
2026-04-13T14:27:44Z

On 4/11/26 10:31 PM, bot+bpf-ci@kernel.org wrote:
>> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
>> index 4c67a15c73e1..cddd39ebb40b 100644
>> --- a/kernel/bpf/verifier.c
>> +++ b/kernel/bpf/verifier.c
> [ ... ]
>
>> @@ -8591,11 +8591,13 @@ static int check_helper_mem_access(struct bpf_verifier_env *env, int regno,
>> * containing the pointer.
>> */
>> static int check_mem_size_reg(struct bpf_verifier_env *env,
>> - struct bpf_reg_state *reg, u32 regno,
>> + struct bpf_reg_state *mem_reg,
>> + struct bpf_reg_state *size_reg, u32 mem_regno,
> The function comment above still says "@regno is the register
> containing the access size. regno-1 is the register containing
> the pointer."
>
> After this refactor there is no @regno parameter. The parameter is
> now mem_regno, which is the memory (pointer) register, not the size
> register. Should the comment be updated to match the new signature?
> Something like "@mem_regno is the register containing the pointer,
> size register is at mem_regno+1" would match the actual interface.

Ack. Comments need update as well.

>
>
> ---
> 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/24299298635