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 5C5E5C77B6F for ; Tue, 11 Apr 2023 15:29:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229488AbjDKP3c (ORCPT ); Tue, 11 Apr 2023 11:29:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230414AbjDKP3Y (ORCPT ); Tue, 11 Apr 2023 11:29:24 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8385059CF for ; Tue, 11 Apr 2023 08:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681226958; x=1712762958; h=date:from:to:cc:subject:message-id:mime-version; bh=bB6vsOiDcv3CS9vf/cuHxFzwAprNPQaMOAJGGScUbT4=; b=HxvRK9KdiEP/LrzyUOkTb6/O2cp/W3kaJs0TdYtZA0D1ldrAVl2SkY/J TEguOMYF/hyys0sv2HrpFiW16vg8fMbs4JCwXGbTsjww5ZDETnZDpswLB 3Z30MXgdy0CA32fF3QIYtTWtbIC/VDgLpTFx9wqeJXZwPkYZE9ysCWva3 j4NxwB96dx6+94wgsmIyvHm78f7mxJSN/Dnqsh17SAjWYPVAcnyHIxcuy S6VESKPTh3mgcykzjgnOJcztPaC/Oiwg0f1QyKPpiTsdbKn8lQwbaiz1X BgG45PZV2EsJqWnnrmlexAR2ZqGjOqGQhd5c8kzwwja7YO5dh8aNSgpp6 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10677"; a="346321002" X-IronPort-AV: E=Sophos;i="5.98,336,1673942400"; d="scan'208";a="346321002" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2023 08:29:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10677"; a="666024097" X-IronPort-AV: E=Sophos;i="5.98,336,1673942400"; d="scan'208";a="666024097" Received: from lkp-server01.sh.intel.com (HELO b613635ddfff) ([10.239.97.150]) by orsmga006.jf.intel.com with ESMTP; 11 Apr 2023 08:29:16 -0700 Received: from kbuild by b613635ddfff with local (Exim 4.96) (envelope-from ) id 1pmFvm-000WRJ-2j; Tue, 11 Apr 2023 15:29:14 +0000 Date: Tue, 11 Apr 2023 23:28:58 +0800 From: kernel test robot To: "Gustavo A. R. Silva" Cc: oe-kbuild-all@lists.linux.dev, "Gustavo A. R. Silva" , LKML Subject: [gustavoars:testing/fsfa3 17/22] arch/sparc/mm/init_64.c:3057:31: error: array subscript -1 is outside array bounds of 'char[]' Message-ID: <202304112345.Pn0e4esE-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/fsfa3 head: f33754bc67ff9f8377288f8795bf8ee536f6f16b commit: 2226ddb6a576f7f89a8a06a3f89b68f5109ded53 [17/22] Makefile: Enable -Wstringop-overflow and -Warray-bounds config: sparc64-buildonly-randconfig-r006-20230411 (https://download.01.org/0day-ci/archive/20230411/202304112345.Pn0e4esE-lkp@intel.com/config) compiler: sparc64-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://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=2226ddb6a576f7f89a8a06a3f89b68f5109ded53 git remote add gustavoars https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git git fetch --no-tags gustavoars testing/fsfa3 git checkout 2226ddb6a576f7f89a8a06a3f89b68f5109ded53 # 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=sparc64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc64 SHELL=/bin/bash arch/sparc/mm/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202304112345.Pn0e4esE-lkp@intel.com/ All errors (new ones prefixed by >>): arch/sparc/mm/init_64.c: In function 'sun4v_linear_pte_xor_finalize': arch/sparc/mm/init_64.c:2206:23: error: variable 'pagecv_flag' set but not used [-Werror=unused-but-set-variable] 2206 | unsigned long pagecv_flag; | ^~~~~~~~~~~ In function 'kernel_lds_init', inlined from 'report_memory' at arch/sparc/mm/init_64.c:3069:2: >> arch/sparc/mm/init_64.c:3057:31: error: array subscript -1 is outside array bounds of 'char[]' [-Werror=array-bounds] 3057 | code_resource.end = compute_kern_paddr(_etext - 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from arch/sparc/include/asm/sections.h:6, from include/linux/interrupt.h:21, from include/linux/kernel_stat.h:9, from include/linux/cgroup.h:26, from include/linux/hugetlb.h:10, from arch/sparc/mm/init_64.c:16: include/asm-generic/sections.h: In function 'report_memory': include/asm-generic/sections.h:35:32: note: at offset -1 into object '_etext' of size [0, 9223372036854775807] 35 | extern char _text[], _stext[], _etext[]; | ^~~~~~ In function 'kernel_lds_init', inlined from 'report_memory' at arch/sparc/mm/init_64.c:3069:2: arch/sparc/mm/init_64.c:3059:31: error: array subscript -1 is outside array bounds of 'char[]' [-Werror=array-bounds] 3059 | data_resource.end = compute_kern_paddr(_edata - 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/sections.h: In function 'report_memory': include/asm-generic/sections.h:36:32: note: at offset -1 into object '_edata' of size [0, 9223372036854775807] 36 | extern char _data[], _sdata[], _edata[]; | ^~~~~~ In function 'kernel_lds_init', inlined from 'report_memory' at arch/sparc/mm/init_64.c:3069:2: arch/sparc/mm/init_64.c:3061:31: error: array subscript -1 is outside array bounds of 'char[]' [-Werror=array-bounds] 3061 | bss_resource.end = compute_kern_paddr(_end - 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/sections.h: In function 'report_memory': include/asm-generic/sections.h:41:13: note: at offset -1 into object '_end' of size [0, 9223372036854775807] 41 | extern char _end[]; | ^~~~ cc1: all warnings being treated as errors vim +3057 arch/sparc/mm/init_64.c f6d4fb5cc0475c bob picco 2014-03-03 3053 f6d4fb5cc0475c bob picco 2014-03-03 3054 static void __init kernel_lds_init(void) f6d4fb5cc0475c bob picco 2014-03-03 3055 { f6d4fb5cc0475c bob picco 2014-03-03 3056 code_resource.start = compute_kern_paddr(_text); f6d4fb5cc0475c bob picco 2014-03-03 @3057 code_resource.end = compute_kern_paddr(_etext - 1); f6d4fb5cc0475c bob picco 2014-03-03 3058 data_resource.start = compute_kern_paddr(_etext); f6d4fb5cc0475c bob picco 2014-03-03 3059 data_resource.end = compute_kern_paddr(_edata - 1); f6d4fb5cc0475c bob picco 2014-03-03 3060 bss_resource.start = compute_kern_paddr(__bss_start); f6d4fb5cc0475c bob picco 2014-03-03 3061 bss_resource.end = compute_kern_paddr(_end - 1); f6d4fb5cc0475c bob picco 2014-03-03 3062 } f6d4fb5cc0475c bob picco 2014-03-03 3063 :::::: The code at line 3057 was first introduced by commit :::::: f6d4fb5cc0475c36437a618db31cbb7f2bf7c282 sparc64 - add mem to iomem resource :::::: TO: bob picco :::::: CC: David S. Miller -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests