Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E518C3BBD4; Sat, 9 Mar 2024 15:04:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709996697; cv=none; b=iMfcNioBeiBZlErzLMrih8dn5JltjxQ8etH2LMYjzQ7718OADuFPOUC32mg+8Vgr85xU1yNa7l0KSfizF955uckhU0JszFpdnO2pbgoEeGgtomrhsc/Dc5aB9NgsTb9E7pAtdskt3TVUoQJrAzMpF1brieQvGIRHpx6xi5E/iaw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709996697; c=relaxed/simple; bh=Ug3pk0/X0wod9qPgGzb6oSlba6NAWdn4GaYMwGA06C0=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=aR30MUeUG2Bz4WsVmaxyYbjk5ByY6IWXTiZludX86f0jQ0KYkROBZvW5jYoDIjdJ4Ds8peqpiXtdu1LsWMCwV+t6jg0fwlX4OBzfoli/i4jToISuMVHbjVhHQAhv6F0MKsYDuoRut6r841avhGlTVnUnOvPNErnvGcs2vhbiDUE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ZB2SyFrc; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ZB2SyFrc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709996695; x=1741532695; h=date:from:to:cc:subject:message-id:mime-version; bh=Ug3pk0/X0wod9qPgGzb6oSlba6NAWdn4GaYMwGA06C0=; b=ZB2SyFrc/lmZyN5XNh4O3RK2qfQLhENZCGjxyKPq9GTe8DK9XjuUX6WR kCDzArKi6ELCkqinwNNb07CX/QBE2ZJ5RLngbfXLo6gX11R+qH3ssiuZx Xnzx1ZjnYZaOk1s606jleVsT9W+Go9JJecQlkBFYWOC2SXRsMes8stl+G rhEOXKmImnggz/4tRfUy0S8I4Pbum5jRSYhkFb0vS2oFAGC1/CHTsBDEx ASkMeC6p3J0iQRcvdEnNi2sUKvajKs8nU35oElXR324BV3mZXUAIeoyU6 LrAzqEC3Lkzfa6rfgiATvP7UxLaz+7Z1TQgtRGTR8zs9abtGH86DNp2d0 w==; X-IronPort-AV: E=McAfee;i="6600,9927,11007"; a="4576697" X-IronPort-AV: E=Sophos;i="6.07,112,1708416000"; d="scan'208";a="4576697" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2024 07:02:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,112,1708416000"; d="scan'208";a="10833568" Received: from lkp-server01.sh.intel.com (HELO b21307750695) ([10.239.97.150]) by fmviesa006.fm.intel.com with ESMTP; 09 Mar 2024 07:02:29 -0800 Received: from kbuild by b21307750695 with local (Exim 4.96) (envelope-from ) id 1riyDS-0007Pf-1Y; Sat, 09 Mar 2024 15:02:26 +0000 Date: Sat, 9 Mar 2024 23:01:48 +0800 From: kernel test robot To: Puranjay Mohan Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Alexei Starovoitov Subject: [bpf-next:master 5/7] kernel/bpf/core.c:900:5: warning: '__pte_index_size' is not defined, evaluates to 0 Message-ID: <202403092219.dhgcuz2G-lkp@intel.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master head: d0d131e3b655fd267d14bb1bed49e3f990a1465e commit: 643714ff18301f41bded2489e8f1f9d1b4782094 [5/7] bpf: cap BPF_PROG_PACK_SIZE to 2MB * num_possible_nodes() config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20240309/202403092219.dhgcuz2G-lkp@intel.com/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 503c55e17037436dcd45ac69dea8967e67e3f5e8) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240309/202403092219.dhgcuz2G-lkp@intel.com/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 | Closes: https://lore.kernel.org/oe-kbuild-all/202403092219.dhgcuz2G-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from kernel/bpf/core.c:21: In file included from include/linux/filter.h:9: In file included from include/linux/bpf.h:21: In file included from include/linux/kallsyms.h:13: In file included from include/linux/mm.h:2188: include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 509 | item]; | ~~~~ include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 516 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 528 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 537 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ In file included from kernel/bpf/core.c:21: In file included from include/linux/filter.h:9: include/linux/bpf.h:739:48: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 739 | ARG_PTR_TO_MAP_VALUE_OR_NULL = PTR_MAYBE_NULL | ARG_PTR_TO_MAP_VALUE, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~ include/linux/bpf.h:740:43: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 740 | ARG_PTR_TO_MEM_OR_NULL = PTR_MAYBE_NULL | ARG_PTR_TO_MEM, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ include/linux/bpf.h:741:43: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 741 | ARG_PTR_TO_CTX_OR_NULL = PTR_MAYBE_NULL | ARG_PTR_TO_CTX, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ include/linux/bpf.h:742:45: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 742 | ARG_PTR_TO_SOCKET_OR_NULL = PTR_MAYBE_NULL | ARG_PTR_TO_SOCKET, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ include/linux/bpf.h:743:44: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 743 | ARG_PTR_TO_STACK_OR_NULL = PTR_MAYBE_NULL | ARG_PTR_TO_STACK, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~ include/linux/bpf.h:744:45: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 744 | ARG_PTR_TO_BTF_ID_OR_NULL = PTR_MAYBE_NULL | ARG_PTR_TO_BTF_ID, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ include/linux/bpf.h:748:38: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 748 | ARG_PTR_TO_UNINIT_MEM = MEM_UNINIT | ARG_PTR_TO_MEM, | ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ include/linux/bpf.h:750:45: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 750 | ARG_PTR_TO_FIXED_SIZE_MEM = MEM_FIXED_SIZE | ARG_PTR_TO_MEM, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ include/linux/bpf.h:773:48: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_return_type') [-Wenum-enum-conversion] 773 | RET_PTR_TO_MAP_VALUE_OR_NULL = PTR_MAYBE_NULL | RET_PTR_TO_MAP_VALUE, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~ include/linux/bpf.h:774:45: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_return_type') [-Wenum-enum-conversion] 774 | RET_PTR_TO_SOCKET_OR_NULL = PTR_MAYBE_NULL | RET_PTR_TO_SOCKET, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ include/linux/bpf.h:775:47: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_return_type') [-Wenum-enum-conversion] 775 | RET_PTR_TO_TCP_SOCK_OR_NULL = PTR_MAYBE_NULL | RET_PTR_TO_TCP_SOCK, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~ include/linux/bpf.h:776:50: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_return_type') [-Wenum-enum-conversion] 776 | RET_PTR_TO_SOCK_COMMON_OR_NULL = PTR_MAYBE_NULL | RET_PTR_TO_SOCK_COMMON, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~ include/linux/bpf.h:778:49: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_return_type') [-Wenum-enum-conversion] 778 | RET_PTR_TO_DYNPTR_MEM_OR_NULL = PTR_MAYBE_NULL | RET_PTR_TO_MEM, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ include/linux/bpf.h:779:45: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_return_type') [-Wenum-enum-conversion] 779 | RET_PTR_TO_BTF_ID_OR_NULL = PTR_MAYBE_NULL | RET_PTR_TO_BTF_ID, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ include/linux/bpf.h:780:43: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_return_type') [-Wenum-enum-conversion] 780 | RET_PTR_TO_BTF_ID_TRUSTED = PTR_TRUSTED | RET_PTR_TO_BTF_ID, | ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ include/linux/bpf.h:891:44: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_reg_type') [-Wenum-enum-conversion] 891 | PTR_TO_MAP_VALUE_OR_NULL = PTR_MAYBE_NULL | PTR_TO_MAP_VALUE, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~ include/linux/bpf.h:892:42: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_reg_type') [-Wenum-enum-conversion] 892 | PTR_TO_SOCKET_OR_NULL = PTR_MAYBE_NULL | PTR_TO_SOCKET, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ include/linux/bpf.h:893:46: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_reg_type') [-Wenum-enum-conversion] 893 | PTR_TO_SOCK_COMMON_OR_NULL = PTR_MAYBE_NULL | PTR_TO_SOCK_COMMON, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~ include/linux/bpf.h:894:44: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_reg_type') [-Wenum-enum-conversion] 894 | PTR_TO_TCP_SOCK_OR_NULL = PTR_MAYBE_NULL | PTR_TO_TCP_SOCK, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~ include/linux/bpf.h:895:42: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_reg_type') [-Wenum-enum-conversion] 895 | PTR_TO_BTF_ID_OR_NULL = PTR_MAYBE_NULL | PTR_TO_BTF_ID, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ >> kernel/bpf/core.c:900:5: warning: '__pte_index_size' is not defined, evaluates to 0 [-Wundef] 900 | #if PMD_SIZE <= (1 << 21) | ^ arch/powerpc/include/asm/book3s/64/pgtable.h:208:26: note: expanded from macro 'PMD_SIZE' 208 | #define PMD_SIZE (1UL << PMD_SHIFT) | ^ arch/powerpc/include/asm/book3s/64/pgtable.h:207:33: note: expanded from macro 'PMD_SHIFT' 207 | #define PMD_SHIFT (PAGE_SHIFT + PTE_INDEX_SIZE) | ^ arch/powerpc/include/asm/book3s/64/pgtable.h:156:25: note: expanded from macro 'PTE_INDEX_SIZE' 156 | #define PTE_INDEX_SIZE __pte_index_size | ^ 26 warnings generated. -- >> kernel/bpf/core.c:900:5: warning: '__pte_index_size' is not defined, evaluates to 0 [-Wundef] 900 | #if PMD_SIZE <= (1 << 21) | ^ arch/powerpc/include/asm/book3s/64/pgtable.h:208:26: note: expanded from macro 'PMD_SIZE' 208 | #define PMD_SIZE (1UL << PMD_SHIFT) | ^ arch/powerpc/include/asm/book3s/64/pgtable.h:207:33: note: expanded from macro 'PMD_SHIFT' 207 | #define PMD_SHIFT (PAGE_SHIFT + PTE_INDEX_SIZE) | ^ arch/powerpc/include/asm/book3s/64/pgtable.h:156:25: note: expanded from macro 'PTE_INDEX_SIZE' 156 | #define PTE_INDEX_SIZE __pte_index_size | ^ 1 warning generated. vim +/__pte_index_size +900 kernel/bpf/core.c 891 892 /* PMD_SIZE is not available in some special config, e.g. ARCH=arm with 893 * CONFIG_MMU=n. Use PAGE_SIZE in these cases. 894 */ 895 #ifdef PMD_SIZE 896 /* PMD_SIZE is really big for some archs. It doesn't make sense to 897 * reserve too much memory in one allocation. Cap BPF_PROG_PACK_SIZE to 898 * 2MiB * num_possible_nodes(). 899 */ > 900 #if PMD_SIZE <= (1 << 21) 901 #define BPF_PROG_PACK_SIZE (PMD_SIZE * num_possible_nodes()) 902 #else 903 #define BPF_PROG_PACK_SIZE ((1 << 21) * num_possible_nodes()) 904 #endif 905 #else 906 #define BPF_PROG_PACK_SIZE PAGE_SIZE 907 #endif 908 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki