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

2025-05-05 Thread Luis Gerhorst
Eduard Zingerman 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 > comput

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

2025-05-01 Thread Kumar Kartikeya Dwivedi
On Thu, 1 May 2025 at 09:43, Luis Gerhorst wrote: > > This is required to catch the errors later and fall back to a nospec if > on a speculative path. > > Eliminate the regs variable as it is only used once and insn_idx is not > modified in-between the definition and usage. > > Still pass insn sim

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

2025-05-01 Thread Eduard Zingerman
On Thu, 2025-05-01 at 09:35 +0200, Luis Gerhorst wrote: > This is required to catch the errors later and fall back to a nospec if > on a speculative path. > > Eliminate the regs variable as it is only used once and insn_idx is not > modified in-between the definition and usage. > > Still pass ins