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 D82FBC77B7E for ; Sun, 28 May 2023 00:09:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 368D5900003; Sat, 27 May 2023 20:09:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3171D900002; Sat, 27 May 2023 20:09:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 190CE900003; Sat, 27 May 2023 20:09:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 0A203900002 for ; Sat, 27 May 2023 20:09:37 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id D2A7DA02EF for ; Sun, 28 May 2023 00:09:36 +0000 (UTC) X-FDA: 80837729952.10.D500FFC Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by imf17.hostedemail.com (Postfix) with ESMTP id C667140014 for ; Sun, 28 May 2023 00:09:33 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ka8hvt2g; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf17.hostedemail.com: domain of lkp@intel.com designates 192.55.52.151 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685232574; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=HFRtDYq1sky90KELCEwGuEy/oB5oVWkG24FOdMCdy+4=; b=BOSNCR+z0q0UmSILSHT0eqWEplC/ZG0OHTb6y1mV3FIWDkaB+tkjQdqGQPKOGso8kQlq5F bkwT/fhvG7LDzV/LBZ5Sm3zIi/KNQ8gJGRmUyRhGwcilegfHMYWNCrhUXoy3pMSUE0fpyV CFBD101EebeYkSim1duIegtDRc+Cs0c= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ka8hvt2g; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf17.hostedemail.com: domain of lkp@intel.com designates 192.55.52.151 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685232574; a=rsa-sha256; cv=none; b=YaBovZNfXgUcV/ZITWsK0K62Pvj1eLMLi+A/Q+3JpZ9UAQINwjHw6Vg+kweoB4T3fOGNk2 rBzeYcpGlqdu1zInY4uAQQosjPpH8vnpCkPxew/u+iuiTD82BOtv/VWIpzok6wJqWd3BoS hUqlShuH/7X9YFZxJQ21apvCd+oydkA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685232573; x=1716768573; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=a9gIudvxnsEuKt6ByRRnLGP+BwC0R1njnXJ4h3gya0I=; b=ka8hvt2g6tVF4i6cMlSd8acfudmLjfNVCNcsYNCoZ/kEOAgmvS/5hrrs Eg8zHO9BpCLy6K0LR7ShVAm7Eo3WEtC31JDvWJa/XFCpDqHP/iXVMTWhV nXWdlO0URXwCANwPQwmClntlnCFPsrIgnm2DAAGP06GJpzTY1zzCFOjCS YpsF1FDJGdad9r48ErLO7DLmZ02KNIeIDsrTjXxx5xzB/EnEXob6jZQud 3EFBunY+fJ+octr9tGvmYBvR1VVn7A9QGv28eAKy9d9Lsbd6MQ6QSo6Oj OcBKF4HJ/JFuRM6WK+VRjycbL03M9IZadHOFoajqzu50L36wfVVjPBrWD A==; X-IronPort-AV: E=McAfee;i="6600,9927,10723"; a="334815483" X-IronPort-AV: E=Sophos;i="6.00,198,1681196400"; d="scan'208";a="334815483" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2023 17:09:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10723"; a="849932954" X-IronPort-AV: E=Sophos;i="6.00,198,1681196400"; d="scan'208";a="849932954" Received: from lkp-server01.sh.intel.com (HELO dea6d5a4f140) ([10.239.97.150]) by fmsmga001.fm.intel.com with ESMTP; 27 May 2023 17:09:29 -0700 Received: from kbuild by dea6d5a4f140 with local (Exim 4.96) (envelope-from ) id 1q33yS-000KGk-2t; Sun, 28 May 2023 00:09:28 +0000 Date: Sun, 28 May 2023 08:08:51 +0800 From: kernel test robot To: Zhen Lei , Eric Biederman , Baoquan He , kexec@lists.infradead.org, linux-kernel@vger.kernel.org Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Zhen Lei , Michael Holzheu , Andrew Morton , Linux Memory Management List , Amerigo Wang Subject: Re: [PATCH 5/6] kexec: add helper __crash_shrink_memory() Message-ID: <202305280717.Pw06aLkz-lkp@intel.com> References: <20230527123439.772-6-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230527123439.772-6-thunder.leizhen@huawei.com> X-Rspamd-Queue-Id: C667140014 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: hggdf411tuutuoushkmndpya17zpiotb X-HE-Tag: 1685232573-296944 X-HE-Meta: U2FsdGVkX1//tMCty+WtdqqMn0EZYuEv/KDKUyAPSoWmh+2VUOeKk3SGYuEq70aTS3c/Ymk/x9IHiU1Qw7l4Se0e1gU6abYtCd/gVJAXsf2VLJhVT4IiMSf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yWSOXl1/kH2z4mTg8kZb9enALVhXvPe1iT1sWulLEMLsME8zkFp66uH2dK+1iMjDJHjLf07AQnYj0bO7ag5gRTlVvwH/tctrOvi7rn46/4B0SKdR2++G2pJwNINeFqy/JV7tSigrW52kaV1PdcvzDffKj/UM6FiDO8wID0yrik2q02YOVt9h14HCagKcHg2nlGids9qVj+GLGaecF0dsHp4a/qdP+bZ94xlldwhEV8Pbk9+9rC9vUcG9fz1GqLIB3rEn7KUUsC6gj0V8tGyST6H1tqRUWSrlQI2KBllxlLKhrtCgQ== 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 Zhen, kernel test robot noticed the following build warnings: [auto build test WARNING on akpm-mm/mm-everything] [also build test WARNING on linus/master v6.4-rc3 next-20230525] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Zhen-Lei/kexec-fix-a-memory-leak-in-crash_shrink_memory/20230527-203821 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20230527123439.772-6-thunder.leizhen%40huawei.com patch subject: [PATCH 5/6] kexec: add helper __crash_shrink_memory() config: riscv-randconfig-r042-20230526 (https://download.01.org/0day-ci/archive/20230528/202305280717.Pw06aLkz-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 4faf3aaf28226a4e950c103a14f6fc1d1fdabb1b) reproduce (this is a W=1 build): mkdir -p ~/bin wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://github.com/intel-lab-lkp/linux/commit/dea97cef503d26e05d0e11818ae44176056ddf64 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Zhen-Lei/kexec-fix-a-memory-leak-in-crash_shrink_memory/20230527-203821 git checkout dea97cef503d26e05d0e11818ae44176056ddf64 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=riscv olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202305280717.Pw06aLkz-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/kexec_core.c:1108:5: warning: no previous prototype for function '__crash_shrink_memory' [-Wmissing-prototypes] int __crash_shrink_memory(struct resource *old_res, unsigned long new_size) ^ kernel/kexec_core.c:1108:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int __crash_shrink_memory(struct resource *old_res, unsigned long new_size) ^ static 1 warning generated. vim +/__crash_shrink_memory +1108 kernel/kexec_core.c 1107 > 1108 int __crash_shrink_memory(struct resource *old_res, unsigned long new_size) 1109 { 1110 struct resource *ram_res; 1111 1112 ram_res = kzalloc(sizeof(*ram_res), GFP_KERNEL); 1113 if (!ram_res) 1114 return -ENOMEM; 1115 1116 ram_res->start = old_res->start + new_size; 1117 ram_res->end = old_res->end; 1118 ram_res->flags = IORESOURCE_BUSY | IORESOURCE_SYSTEM_RAM; 1119 ram_res->name = "System RAM"; 1120 1121 if (!new_size) { 1122 release_resource(old_res); 1123 old_res->start = 0; 1124 old_res->end = 0; 1125 } else { 1126 crashk_res.end = ram_res->start - 1; 1127 } 1128 1129 crash_free_reserved_phys_range(ram_res->start, ram_res->end); 1130 insert_resource(&iomem_resource, ram_res); 1131 1132 return 0; 1133 } 1134 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki