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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B342C433F5 for ; Thu, 31 Mar 2022 15:54:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C83536B0072; Thu, 31 Mar 2022 11:54:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C329D6B0073; Thu, 31 Mar 2022 11:54:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B21606B0074; Thu, 31 Mar 2022 11:54:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id A14B66B0072 for ; Thu, 31 Mar 2022 11:54:56 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 71E4BBF5 for ; Thu, 31 Mar 2022 15:54:56 +0000 (UTC) X-FDA: 79305129792.08.6E0FCDE Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by imf18.hostedemail.com (Postfix) with ESMTP id 59FAC1C0019 for ; Thu, 31 Mar 2022 15:54:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648742095; x=1680278095; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7T7GLlriaF2A5bwKoW5oZoyB9UoM65n6FmNK69DBzGs=; b=h4GwlOvqUnKu5lfsaHviF2uhCpuQ/25ptXLmtt62gbBw0RH6US7E7xmX VCK04uyGowvj7lNs9u1gzggvXLqdqsM5rZxgnQUCH1imWVpbX8cyp6Abi VIINc9elKA1WsE49K8LyEfWVdnhfu2y5ImeymzFMWwltt2O9a9ZlqXQAd iZBEzoaF7f6EErmK6GLrawPxS+6s5jgbORwL5TZ3xVrFn80pgNW6SDOFF WGAVqhm9EHjQ1EKzcK18o2yq3l3GoIXryWnTueLtd5isMiznneXzCRlol 9MgZ2FZUHbxDpqDuQykLUaKn3MewE3Jg9OOySZUMv9jyskhtB3uCk26C3 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10302"; a="323052438" X-IronPort-AV: E=Sophos;i="5.90,225,1643702400"; d="scan'208";a="323052438" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2022 08:54:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,225,1643702400"; d="scan'208";a="586480733" Received: from lkp-server02.sh.intel.com (HELO 3231c491b0e2) ([10.239.97.151]) by orsmga001.jf.intel.com with ESMTP; 31 Mar 2022 08:54:51 -0700 Received: from kbuild by 3231c491b0e2 with local (Exim 4.95) (envelope-from ) id 1nZx8M-0000P4-CT; Thu, 31 Mar 2022 15:54:50 +0000 Date: Thu, 31 Mar 2022 23:54:02 +0800 From: kernel test robot To: Waiman Long , Andrew Morton Cc: kbuild-all@lists.01.org, Linux Memory Management List , linux-kernel@vger.kernel.org, "Kirill A . Shutemov" , Ingo Molnar , Justin Forbes , Rafael Aquini , Waiman Long Subject: Re: [PATCH v3] mm/sparsemem: Fix 'mem_section' will never be NULL gcc 12 warning Message-ID: <202203312327.XGeCiD5T-lkp@intel.com> References: <20220330205919.2713275-1-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220330205919.2713275-1-longman@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=h4GwlOvq; spf=none (imf18.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.100) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Stat-Signature: djbetthwx488emewars5yziibdcooatf X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 59FAC1C0019 X-HE-Tag: 1648742095-492952 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Waiman, I love your patch! Perhaps something to improve: [auto build test WARNING on hnaz-mm/master] url: https://github.com/intel-lab-lkp/linux/commits/Waiman-Long/mm-sparsemem-Fix-mem_section-will-never-be-NULL-gcc-12-warning/20220331-050049 base: https://github.com/hnaz/linux-mm master config: arm-randconfig-c024-20220330 (https://download.01.org/0day-ci/archive/20220331/202203312327.XGeCiD5T-lkp@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/2098f1d78cde338e81b3ba596ea39f37824e496e git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Waiman-Long/mm-sparsemem-Fix-mem_section-will-never-be-NULL-gcc-12-warning/20220331-050049 git checkout 2098f1d78cde338e81b3ba596ea39f37824e496e # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash security/keys/encrypted-keys/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from include/linux/gfp.h:6, from include/linux/umh.h:4, from include/linux/kmod.h:9, from include/linux/module.h:17, from security/keys/encrypted-keys/encrypted.c:15: security/keys/encrypted-keys/encrypted.c: In function 'derived_key_encrypt.constprop': >> include/linux/mmzone.h:1432:23: warning: array subscript 32 is outside array bounds of 'struct mem_section[32][1]' [-Warray-bounds] 1432 | unsigned long map = section->section_mem_map; | ^~~ include/linux/mmzone.h:1390:27: note: while referencing 'mem_section' 1390 | extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT]; | ^~~~~~~~~~~ vim +1432 include/linux/mmzone.h 29751f6991e845 Andy Whitcroft 2005-06-23 1429 29751f6991e845 Andy Whitcroft 2005-06-23 1430 static inline struct page *__section_mem_map_addr(struct mem_section *section) 29751f6991e845 Andy Whitcroft 2005-06-23 1431 { 29751f6991e845 Andy Whitcroft 2005-06-23 @1432 unsigned long map = section->section_mem_map; 29751f6991e845 Andy Whitcroft 2005-06-23 1433 map &= SECTION_MAP_MASK; 29751f6991e845 Andy Whitcroft 2005-06-23 1434 return (struct page *)map; 29751f6991e845 Andy Whitcroft 2005-06-23 1435 } 29751f6991e845 Andy Whitcroft 2005-06-23 1436 -- 0-DAY CI Kernel Test Service https://01.org/lkp