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, Sep 11, 2025 at 2:26 PM Eduard Zingerman <eddyz87@xxxxxxxxx> wrote:
>
> On Thu, 2025-09-11 at 22:19 +0800, kernel test robot wrote:
> > Hi Eduard,
> >
> > kernel test robot noticed the following build warnings:
> >
> > [auto build test WARNING on bpf-next/master]
> >
> > url:    https://github.com/intel-lab-lkp/linux/commits/Eduard-Zingerman/bpf-bpf_verifier_state-cleaned-flag-instead-of-REG_LIVE_DONE/20250911-090604
> > base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
> > patch link:    https://lore.kernel.org/r/20250911010437.2779173-10-eddyz87%40gmail.com
> > patch subject: [PATCH bpf-next v1 09/10] bpf: disable and remove registers chain based liveness
> > config: x86_64-buildonly-randconfig-003-20250911 (https://download.01.org/0day-ci/archive/20250911/202509112112.wkWw6wJW-lkp@xxxxxxxxx/config)
> > compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250911/202509112112.wkWw6wJW-lkp@xxxxxxxxx/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > > Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > > Closes: https://lore.kernel.org/oe-kbuild-all/202509112112.wkWw6wJW-lkp@xxxxxxxxx/
> >
> > All warnings (new ones prefixed by >>):
> >
> > > > kernel/bpf/verifier.c:19305:11: warning: variable 'err' is uninitialized when used here [-Wuninitialized]
> >     19305 |                                 err = err ? : push_jmp_history(env, cur, 0, 0);
> >           |                                       ^~~
> >    kernel/bpf/verifier.c:19140:12: note: initialize the variable 'err' to silence this warning
> >     19140 |         int n, err, states_cnt = 0;
> >           |                   ^
> >           |                    = 0
> >    1 warning generated.
> >
> >
> > vim +/err +19305 kernel/bpf/verifier.c
>
> This was sloppy on my side, should look as follows:
>
> --- 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 ?





[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