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 1EFE7C433F5 for ; Wed, 2 Mar 2022 12:07:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7AAAA8D0002; Wed, 2 Mar 2022 07:07:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 75A608D0001; Wed, 2 Mar 2022 07:07:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 647BB8D0002; Wed, 2 Mar 2022 07:07:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id 56EA58D0001 for ; Wed, 2 Mar 2022 07:07:33 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 11300824C43A for ; Wed, 2 Mar 2022 12:07:33 +0000 (UTC) X-FDA: 79199321586.29.F40DAF9 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf05.hostedemail.com (Postfix) with ESMTP id 67A2010000D for ; Wed, 2 Mar 2022 12:07:32 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 069C61F37E; Wed, 2 Mar 2022 12:07:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1646222851; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Eo8d/qlFFmHzEnqL6EKmZWaAlz+V/Y6U9xR47zJcmUY=; b=mpnTEIP6J1FQb1UUKYFMSOUnb3u52cYN9YNW194AD5Cfwuk2tIS6Ua/dsaymEMv5AefFCf Oqk43prmg2hF3nuf9jCle1WIgFjteFGiSzGXsCGNeSJ+O7dbXo0SyX7sIpW1U2iNBIj+mT O+H7O0MYv5xjymbrqrZ4ZfzoZwyQqIQ= Received: from suse.cz (unknown [10.100.224.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id ABCFAA3B8B; Wed, 2 Mar 2022 12:07:29 +0000 (UTC) Date: Wed, 2 Mar 2022 13:07:29 +0100 From: Petr Mladek To: Andrew Morton Cc: kernel test robot , Maninder Singh , kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Johannes Weiner , Vaneet Narang , Linux Memory Management List , Sergey Senozhatsky , Steven Rostedt , John Ogness Subject: Re: [hnaz-mm:master 272/379] lib/vsprintf.c:991:13: warning: variable 'modbuildid' set but not used Message-ID: References: <202203012040.uFWGm3My-lkp@intel.com> <20220301102448.ff9bf910213d705842a2dd45@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220301102448.ff9bf910213d705842a2dd45@linux-foundation.org> X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 67A2010000D X-Rspam-User: Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=mpnTEIP6; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf05.hostedemail.com: domain of pmladek@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=pmladek@suse.com X-Stat-Signature: k4wrjo4ri5pnxuqmd7349r86bmb5orb7 X-HE-Tag: 1646222852-67599 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: On Tue 2022-03-01 10:24:48, Andrew Morton wrote: > On Tue, 1 Mar 2022 20:11:04 +0800 kernel test robot wrote: > > > tree: https://github.com/hnaz/linux-mm master > > head: a46912c14343fd3269cc133494988af90b377d9f > > commit: b314f622e664eb263ea03ef7f4580e37146f123f [272/379] kallsyms: enhance %pS/s/b printing when KALLSYSMS is disabled > > config: arm-eseries_pxa_defconfig (https://download.01.org/0day-ci/archive/20220301/202203012040.uFWGm3My-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/hnaz/linux-mm/commit/b314f622e664eb263ea03ef7f4580e37146f123f > > git remote add hnaz-mm https://github.com/hnaz/linux-mm > > git fetch --no-tags hnaz-mm master > > git checkout b314f622e664eb263ea03ef7f4580e37146f123f > > # 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 > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot > > > > All warnings (new ones prefixed by >>): > > > > lib/vsprintf.c: In function 'sprint_module_info': > > >> lib/vsprintf.c:991:13: warning: variable 'modbuildid' set but not used [-Wunused-but-set-variable] > > 991 | int modbuildid = 0; > > | ^~~~~~~~~~ > > Do we care about this? [-Wunused-but-set-variable isn't normally set. > Under what circumstances does it get set in your setup? > > I did this: > > --- a/lib/vsprintf.c~kallsyms-enhance-%ps-s-b-printing-when-kallsysms-is-disabled-fix > +++ a/lib/vsprintf.c > @@ -988,7 +988,7 @@ static int sprint_module_info(char *buf, > unsigned long base; > int ret = 0; > const char *modname; > - int modbuildid = 0; > + int modbuildid __maybe_unused = 0; > int len; > #if IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID) > const unsigned char *buildid = NULL; Looks good. I would fix this. I am not sure but I guess that there are people that try to fix W=1 warnings. That said, I would prefer to disable the patch "kallsyms: enhance %pS/s/b printing when KALLSYSMS is disabled" for now. There are two problems with it: + It discloses the base address of loaded modules. I am not sure if it is acceptable from the security point of view. + It duplicates a lot of code from kallsyms.c. I would like to avoid it. I have pointed out both problems at https://lore.kernel.org/r/YhzywNowPiQm3IN4@alley I have to admit that they are hidden between less important comments. Best Regards, Petr