Re: [PATCH bpf-next v6 1/9] bpf: Upgrade scalar to PTR_TO_ARENA on arena pointer addition

bot+bpf-ci
2026-04-12T01:58:29Z

[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]

> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index 967e132f2662..45e219f9d206 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c

[ ... ]

> +error:
> + verbose(env, "R%d %s R%d: Invalid operation between "
> + "bpf_reg_state types %s and %s\n",
> + insn->dst_reg,
> + bpf_alu_string[opcode >> 4],
> + insn->src_reg,
> + reg_type_str(env, dst_reg->type),
> + reg_type_str(env, src_reg->type));

reg_type_str() writes into the shared buffer env->tmp_str_buf and
returns a pointer to it. Its own comment in log.c says:

Note that reg_type_str() can not appear more than once in a
single verbose() statement.

Calling it twice here means both %s arguments resolve to the same
buffer, so the error message will show one type name twice instead
of showing both. Would splitting this into two verbose() calls work?

This was also flagged during review of the v5 series and acknowledged.

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