Re: [PATCH v2 bpf-next 3/8] bpf: add support for open-coded iterator loops

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

 



On Tue, Mar 7, 2023 at 3:27 PM kernel test robot <lkp@xxxxxxxxx> wrote:
>
> Hi Andrii,
>
> I love your patch! Perhaps something to improve:
>
> [auto build test WARNING on bpf-next/master]
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Andrii-Nakryiko/bpf-factor-out-fetching-basic-kfunc-metadata/20230308-055530
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
> patch link:    https://lore.kernel.org/r/20230307215329.3895377-4-andrii%40kernel.org
> patch subject: [PATCH v2 bpf-next 3/8] bpf: add support for open-coded iterator loops
> config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230308/202303080733.7uzHxIB0-lkp@xxxxxxxxx/config)
> compiler: m68k-linux-gcc (GCC) 12.1.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://github.com/intel-lab-lkp/linux/commit/9eada50b93c4fc3f41032699fda73bc125b37d0e
>         git remote add linux-review https://github.com/intel-lab-lkp/linux
>         git fetch --no-tags linux-review Andrii-Nakryiko/bpf-factor-out-fetching-basic-kfunc-metadata/20230308-055530
>         git checkout 9eada50b93c4fc3f41032699fda73bc125b37d0e
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash kernel/bpf/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Link: https://lore.kernel.org/oe-kbuild-all/202303080733.7uzHxIB0-lkp@xxxxxxxxx/
>
> All warnings (new ones prefixed by >>):
>
>    kernel/bpf/verifier.c: In function 'is_iter_reg_valid_init':
> >> kernel/bpf/verifier.c:1255:32: warning: variable 't' set but not used [-Wunused-but-set-variable]
>     1255 |         const struct btf_type *t;
>          |                                ^
>
>
> vim +/t +1255 kernel/bpf/verifier.c
>
>   1250
>   1251  static bool is_iter_reg_valid_init(struct bpf_verifier_env *env, struct bpf_reg_state *reg,
>   1252                                     struct btf *btf, u32 btf_id, int nr_slots)
>   1253  {
>   1254          struct bpf_func_state *state = func(env, reg);
> > 1255          const struct btf_type *t;
>   1256          int spi, i, j;
>   1257
>   1258          spi = iter_get_spi(env, reg, nr_slots);
>   1259          if (spi < 0)
>   1260                  return false;
>   1261
>   1262          t = btf_type_by_id(btf, btf_id);

some leftover from early v2 attempts, doh

I'll wait an hour or two for some other feedback before spamming with v4

>   1263
>   1264          for (i = 0; i < nr_slots; i++) {
>   1265                  struct bpf_stack_state *slot = &state->stack[spi - i];
>   1266                  struct bpf_reg_state *st = &slot->spilled_ptr;
>   1267
>   1268                  /* only main (first) slot has ref_obj_id set */
>   1269                  if (i == 0 && !st->ref_obj_id)
>   1270                          return false;
>   1271                  if (i != 0 && st->ref_obj_id)
>   1272                          return false;
>   1273                  if (st->iter.btf != btf || st->iter.btf_id != btf_id)
>   1274                          return false;
>   1275
>   1276                  for (j = 0; j < BPF_REG_SIZE; j++)
>   1277                          if (slot->slot_type[j] != STACK_ITER)
>   1278                                  return false;
>   1279          }
>   1280
>   1281          return true;
>   1282  }
>   1283
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests




[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