public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andrii Nakryiko <andrii@kernel.org>,
	bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net
Cc: oe-kbuild-all@lists.linux.dev, andrii@kernel.org,
	kernel-team@fb.com, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH v2 bpf-next 3/8] bpf: add support for open-coded iterator loops
Date: Wed, 8 Mar 2023 07:26:58 +0800	[thread overview]
Message-ID: <202303080733.7uzHxIB0-lkp@intel.com> (raw)
In-Reply-To: <20230307215329.3895377-4-andrii@kernel.org>

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@intel.com/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@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303080733.7uzHxIB0-lkp@intel.com/

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);
  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

  reply	other threads:[~2023-03-07 23:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 21:53 [PATCH v2 bpf-next 0/8] BPF open-coded iterators Andrii Nakryiko
2023-03-07 21:53 ` [PATCH v2 bpf-next 1/8] bpf: factor out fetching basic kfunc metadata Andrii Nakryiko
2023-03-07 21:53 ` [PATCH v2 bpf-next 2/8] bpf: add iterator kfuncs registration and validation logic Andrii Nakryiko
2023-03-07 21:53 ` [PATCH v2 bpf-next 3/8] bpf: add support for open-coded iterator loops Andrii Nakryiko
2023-03-07 23:26   ` kernel test robot [this message]
2023-03-07 23:38     ` Andrii Nakryiko
2023-03-07 21:53 ` [PATCH v2 bpf-next 4/8] bpf: implement number iterator Andrii Nakryiko
2023-03-07 22:14   ` Andrii Nakryiko
2023-03-07 21:53 ` [PATCH v2 bpf-next 5/8] selftests/bpf: add bpf_for_each(), bpf_for(), and bpf_repeat() macros Andrii Nakryiko
2023-03-07 21:53 ` [PATCH v2 bpf-next 6/8] selftests/bpf: add iterators tests Andrii Nakryiko
2023-03-07 21:53 ` [PATCH v2 bpf-next 7/8] selftests/bpf: add number iterator tests Andrii Nakryiko
2023-03-07 21:53 ` [PATCH v2 bpf-next 8/8] selftests/bpf: implement and test custom testmod_seq iterator Andrii Nakryiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202303080733.7uzHxIB0-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox