Re: [PATCH bpf-next v1 09/10] bpf: disable and remove registers chain based liveness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2025-09-11 at 15:00 -0700, Alexei Starovoitov wrote:

[...]

> > --- a/kernel/bpf/verifier.c
> > +++ b/kernel/bpf/verifier.c
> > @@ -19297,9 +19297,12 @@ static int is_state_visited(struct bpf_verifier_env *env, int insn_idx)
> >                          * the precision needs to be propagated back in
> >                          * the current state.
> >                          */
> > -                       if (is_jmp_point(env, env->insn_idx))
> > -                               err = err ? : push_jmp_history(env, cur, 0, 0);
> > -                       err = err ? : propagate_precision(env, &sl->state, cur, NULL);
> > +                       if (is_jmp_point(env, env->insn_idx)) {
> > +                               err = push_jmp_history(env, cur, 0, 0);
> > +                               if (err)
> > +                                       return err;
> > +                       }
> > +                       err = propagate_precision(env, &sl->state, cur, NULL);
> 
> hmm. init err=0 instead and avoid explicit if (err)return err ?

Or like that, yes.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux