On Wed, 2024-04-24 at 23:40 +0100, Cupertino Miranda wrote: > In order to further simplify the code in adjust_scalar_min_max_vals all > the calls to mark_reg_unknown are replaced by __mark_reg_unknown. > > Signed-off-by: Cupertino Miranda <cupertino.miranda@xxxxxxxxxx> > Cc: Yonghong Song <yonghong.song@xxxxxxxxx> > Cc: Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> > Cc: David Faust <david.faust@xxxxxxxxxx> > Cc: Jose Marchesi <jose.marchesi@xxxxxxxxxx> > Cc: Elena Zannoni <elena.zannoni@xxxxxxxxxx> > --- Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx> Nit: if there would be a v4 for this series (hopefully won't), please extend the commit message with something like below: static void mark_reg_unknown(struct bpf_verifier_env *env, struct bpf_reg_state *regs, u32 regno) { if (WARN_ON(regno >= MAX_BPF_REG)) { ... mark all regs not init ... return; } __mark_reg_unknown(env, regs + regno); } The 'regno >= MAX_BPF_REG' does not apply to adjust_scalar_min_max_vals(), because it is only called from the following stack: - check_alu_op - adjust_reg_min_max_vals - adjust_scalar_min_max_vals The check_alu_op() does check_reg_arg() which verifies that both src and dst register numbers are within bounds. [...]