Re: [PATCH v5 bpf-next 11/23] bpf: rename is_branch_taken reg arguments to prepare for the second one

Alexei Starovoitov
2023-10-30T19:40:02Z

On Fri, Oct 27, 2023 at 11:13:34AM -0700, Andrii Nakryiko wrote:
> Just taking mundane refactoring bits out into a separate patch. No
> functional changes.
>
> Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
> ---
> kernel/bpf/verifier.c | 107 +++++++++++++++++++++---------------------
> 1 file changed, 53 insertions(+), 54 deletions(-)
>
> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index f5fcb7fb2c67..aa13f32751a1 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
> @@ -14169,26 +14169,25 @@ static void find_good_pkt_pointers(struct bpf_verifier_state *vstate,
> }));
> }
>
> -static int is_branch32_taken(struct bpf_reg_state *reg, u32 val, u8 opcode)
> +static int is_branch32_taken(struct bpf_reg_state *reg1, u32 val, u8 opcode)
> {
> - struct tnum subreg = tnum_subreg(reg->var_off);

Looks like accidental removal that breaks build.

> s32 sval = (s32)val;
>
> switch (opcode) {
> case BPF_JEQ:
> if (tnum_is_const(subreg))
> return !!tnum_equals_const(subreg, val);