[PATCH bpf-next v3 02/11] bpf: Move insn if/else into do_check_insn()

Luis Gerhorst luis.gerhorst at fau.de
Tue May 6 04:31:54 AEST 2025


Eduard Zingerman <eddyz87 at gmail.com> writes:

> On Thu, 2025-05-01 at 09:35 +0200, Luis Gerhorst wrote:
> 
>> +		dst_reg_type = cur_regs(env)[insn->dst_reg].type;
>
> Implicitly relying on `insn == &env->prog->insnsi[env->cur_idx]`
> is weird. Still think that `insn` parameter should be dropped and
> computed inside this function instead.
>
>> +				return -EINVAL;
>> +			}
>> +process_bpf_exit_full:
>
> Nit: since we are refactoring I'd extract this as a function instead of goto.

Both done, thanks again for the review and testing!


More information about the Linuxppc-dev mailing list