From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16114C6FD1E for ; Wed, 8 Mar 2023 15:02:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231520AbjCHPCG (ORCPT ); Wed, 8 Mar 2023 10:02:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231651AbjCHPCD (ORCPT ); Wed, 8 Mar 2023 10:02:03 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 363D7B8F27 for ; Wed, 8 Mar 2023 07:01:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678287718; x=1709823718; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=wPrvrdUYQzmt/wVjEj0+Xf/VXgPRFXKZ/VsoTy3dv3k=; b=GS5wEFen6bY5VEAdinLGJO/lCHqvLu4Qm/1b4gunmDFymCXAn54FZVGg 2hmkydMpFLK7iSgnET+s5OlVQlTGGtZXKCXCSlYyz+XvQ7lVobOQ/VyWP aJbNbC+/+VoueBQIE67A445b5dhuk/VaMkBhSBurHteikzOolc3tl0QyV wOOH4lF02MMpsVsu6y7JFyPpyglZkj+EseUJiltd2cLQvmh+OvqOHW5MW fktr4hObVBMkokaLDDeUID7yWiOaJQQfPGuQNdC1tk9rRIcDeGpWsRWKd USE7Xw6QmvQc5orBBj/YIuwa60fsRRrha4r30cDUaPzwyTRtjtLabhrgI g==; X-IronPort-AV: E=McAfee;i="6500,9779,10642"; a="363809242" X-IronPort-AV: E=Sophos;i="5.98,244,1673942400"; d="scan'208";a="363809242" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2023 07:01:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10642"; a="679364571" X-IronPort-AV: E=Sophos;i="5.98,244,1673942400"; d="scan'208";a="679364571" Received: from lkp-server01.sh.intel.com (HELO b613635ddfff) ([10.239.97.150]) by fmsmga007.fm.intel.com with ESMTP; 08 Mar 2023 07:01:48 -0800 Received: from kbuild by b613635ddfff with local (Exim 4.96) (envelope-from ) id 1pZvIZ-0002CJ-15; Wed, 08 Mar 2023 15:01:47 +0000 Date: Wed, 8 Mar 2023 23:01:17 +0800 From: kernel test robot To: Andrii Nakryiko , bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, andrii@kernel.org, kernel-team@meta.com, Tejun Heo Subject: Re: [PATCH v4 bpf-next 3/8] bpf: add support for open-coded iterator loops Message-ID: <202303082209.VIxMyiGz-lkp@intel.com> References: <20230308035416.2591326-4-andrii@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230308035416.2591326-4-andrii@kernel.org> Precedence: bulk List-ID: X-Mailing-List: bpf@vger.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-115539 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master patch link: https://lore.kernel.org/r/20230308035416.2591326-4-andrii%40kernel.org patch subject: [PATCH v4 bpf-next 3/8] bpf: add support for open-coded iterator loops config: hexagon-randconfig-r015-20230305 (https://download.01.org/0day-ci/archive/20230308/202303082209.VIxMyiGz-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7) 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/8f263e1296a91ff154a033d7cffbac3ee0ebf2ae 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-115539 git checkout 8f263e1296a91ff154a033d7cffbac3ee0ebf2ae # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash kernel/bpf/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202303082209.VIxMyiGz-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from kernel/bpf/verifier.c:7: In file included from include/linux/bpf-cgroup.h:5: In file included from include/linux/bpf.h:31: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:26: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from kernel/bpf/verifier.c:7: In file included from include/linux/bpf-cgroup.h:5: In file included from include/linux/bpf.h:31: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:26: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from kernel/bpf/verifier.c:7: In file included from include/linux/bpf-cgroup.h:5: In file included from include/linux/bpf.h:31: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:26: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ >> kernel/bpf/verifier.c:1244:23: warning: variable 'j' is uninitialized when used here [-Wuninitialized] if (slot->slot_type[j] == STACK_ITER) ^ kernel/bpf/verifier.c:1229:15: note: initialize the variable 'j' to silence this warning int spi, i, j; ^ = 0 7 warnings generated. vim +/j +1244 kernel/bpf/verifier.c 1224 1225 static bool is_iter_reg_valid_uninit(struct bpf_verifier_env *env, 1226 struct bpf_reg_state *reg, int nr_slots) 1227 { 1228 struct bpf_func_state *state = func(env, reg); 1229 int spi, i, j; 1230 1231 /* For -ERANGE (i.e. spi not falling into allocated stack slots), we 1232 * will do check_mem_access to check and update stack bounds later, so 1233 * return true for that case. 1234 */ 1235 spi = iter_get_spi(env, reg, nr_slots); 1236 if (spi == -ERANGE) 1237 return true; 1238 if (spi < 0) 1239 return spi; 1240 1241 for (i = 0; i < nr_slots; i++) { 1242 struct bpf_stack_state *slot = &state->stack[spi - i]; 1243 > 1244 if (slot->slot_type[j] == STACK_ITER) 1245 return false; 1246 } 1247 1248 return true; 1249 } 1250 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests