Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3051973pxm; Mon, 28 Feb 2022 11:02:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJycqTZry6Yqp2X7ioUTX5Q/bCDfitjUPgf321xR+No0YDpONxdeR9+qpa5qi8fwtXnm61TR X-Received: by 2002:a65:6842:0:b0:375:983d:7e5b with SMTP id q2-20020a656842000000b00375983d7e5bmr17358447pgt.496.1646074925426; Mon, 28 Feb 2022 11:02:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646074925; cv=none; d=google.com; s=arc-20160816; b=ytpRBWw/y7olxPJ5bagDa9S4DY8cqohvmvL92nsRwyZZvv7+jfN9PsP+qiWwrOMAbm 9RXqMMELguZeWwGrgrx8tN5MPZ8FFWsh7K7DtFU8NFrH04KBPd8ZkUBWnpEuxT5xKyLx O5DfRsUpJ6oCwv0VtqmyR3M+KEE/sqM6y3rZnf3RTPqAIHnIFgVwjlxY3/FNPQMzm2To DEiQkn34JchJOSyuknzKMW3t02jMGHOMdH3tH2rzJrTE08Ky6+qil53A4M7AZ41eJMRz nk5FbzZg5bhM7Bcn1hBXBut3rcf26paYdkghBLmJ0K89863Yq+qbH66HruPir4LlUT5b u6lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=nxFxG+9DW/zbGT71Eqg8U6bAxOdM9P4+73jRuLDjcSk=; b=K+wWz5jn4yuiofPBq4qi8x44WhsyYI8gjbhXgSwQqWcLvoDN02LqtUM5RRUS7be2w5 +5bs5/ITQhXoZQFhq9rron28Yn4kM2JtEXuICn6pe+ZPzsLdiwUn2Ju9yriNBe+FhzOz lTyaJbGFVeevho3jjMfMd4/9TOeYhuQd0Q0jIH5E2Gis5oOHK/kqWYJaoG7fyCTJl97D upJN/OYOw6mEZj0QX5X/++k9kL88NaPH2bL6dze3dvWFBmB6qfdaWJ1IjSDxFBfh6AXl jStdvtTUdu+Bk8KbHeVoMn/XKS++y+dkCwY6ZrXQbkk5/i4wDDxI28R5gQook1g8JwAW YLww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dDmyROAH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a1-20020a63e841000000b00341feb9ef48si10355870pgk.302.2022.02.28.11.02.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 11:02:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dDmyROAH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7C7858BF60; Mon, 28 Feb 2022 11:00:12 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238727AbiB1RtZ (ORCPT + 99 others); Mon, 28 Feb 2022 12:49:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238948AbiB1Rnd (ORCPT ); Mon, 28 Feb 2022 12:43:33 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E709D7D03F; Mon, 28 Feb 2022 09:35:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646069725; x=1677605725; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=rL/LDGX5IsDnQdPbHkRMVK6CvzA1sOWyScOPv1bJ4b0=; b=dDmyROAHI4NL7nBBSYLrOi7fMIQLN2NRJebbCBIZKl5PX0yX/hzIpsiB xh1lLfM+T7oBIjkF58OC0nxi315w1mt2k6tuD6N+hgAWAxlBmK3ZHTbzG NvW0I2deYZHHwzsKHNZNH8hLnrquoElaVUhew+F6A+TMwhtwa4bDSUcBj mKOjSUZn/PpwUEO7UK4o9hJlzLl3QQ0tw1xruI2AYUDJ7Kj9HTyM5fUsM sd4iW7jeR33QmsswMeYGbKZL08/KB+TiowggsqnCDfLCUgUztnt7To5UQ 6H0/E+xF5/XySC/a2i/EDq4ZSmbeAsy9x8sFo26YxHXag4hh1ghxrnTG/ g==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="339373867" X-IronPort-AV: E=Sophos;i="5.90,144,1643702400"; d="scan'208";a="339373867" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2022 09:35:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,144,1643702400"; d="scan'208";a="510174103" Received: from lkp-server01.sh.intel.com (HELO 788b1cd46f0d) ([10.239.97.150]) by orsmga006.jf.intel.com with ESMTP; 28 Feb 2022 09:35:14 -0800 Received: from kbuild by 788b1cd46f0d with local (Exim 4.92) (envelope-from ) id 1nOjvW-0007ZQ-6k; Mon, 28 Feb 2022 17:35:14 +0000 Date: Tue, 1 Mar 2022 01:35:02 +0800 From: kernel test robot To: Maninder Singh , mcgrof@kernel.org, pmladek@suse.com, rostedt@goodmis.org, senozhatsky@chromium.org, andriy.shevchenko@linux.intel.com, linux@rasmusvillemoes.dk, akpm@linux-foundation.org, wangkefeng.wang@huawei.com Cc: kbuild-all@lists.01.org, v.narang@samsung.com, swboyd@chromium.org, ojeda@kernel.or, linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, avimalin@gmail.com, atomlin@redhat.com, Maninder Singh Subject: Re: [PATCH 1/1] kallsyms: enhance %pS/s/b printing when KALLSYSMS is disabled Message-ID: <202202281853.EofvQRmv-lkp@intel.com> References: <20220228053447.1584704-1-maninder1.s@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220228053447.1584704-1-maninder1.s@samsung.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Maninder, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on hnaz-mm/master] [also build test WARNING on next-20220225] [cannot apply to mcgrof/modules-next linus/master v5.17-rc6] [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] url: https://github.com/0day-ci/linux/commits/Maninder-Singh/kallsyms-enhance-pS-s-b-printing-when-KALLSYSMS-is-disabled/20220228-140105 base: https://github.com/hnaz/linux-mm master config: alpha-randconfig-r032-20220227 (https://download.01.org/0day-ci/archive/20220228/202202281853.EofvQRmv-lkp@intel.com/config) compiler: alpha-linux-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/0day-ci/linux/commit/fbad94837350bb7c5b1b0c33648f8b20eff0150a git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Maninder-Singh/kallsyms-enhance-pS-s-b-printing-when-KALLSYSMS-is-disabled/20220228-140105 git checkout fbad94837350bb7c5b1b0c33648f8b20eff0150a # 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=alpha 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:993:13: warning: variable 'modbuildid' set but not used [-Wunused-but-set-variable] 993 | int modbuildid = 0; | ^~~~~~~~~~ lib/vsprintf.c: In function 'va_format': lib/vsprintf.c:1761:9: warning: function 'va_format' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 1761 | buf += vsnprintf(buf, end > buf ? end - buf : 0, va_fmt->fmt, va); | ^~~ vim +/modbuildid +993 lib/vsprintf.c 983 984 #if !defined(CONFIG_KALLSYMS) && defined(CONFIG_MODULES) 985 static int sprint_module_info(char *buf, char *end, unsigned long value, 986 const char *fmt) 987 { 988 struct module *mod; 989 unsigned long offset = 1; 990 unsigned long base; 991 int ret = 0; 992 const char *modname; > 993 int modbuildid = 0; 994 int len; 995 #if IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID) 996 const unsigned char *buildid = NULL; 997 #endif 998 999 if (is_ksym_addr(value)) 1000 return 0; 1001 1002 if (*fmt == 'B' && fmt[1] == 'b') 1003 modbuildid = 1; 1004 else if (*fmt == 'S' && (fmt[1] == 'b' || (fmt[1] == 'R' && fmt[2] == 'b'))) 1005 modbuildid = 1; 1006 else if (*fmt != 's') { 1007 /* 1008 * do nothing. 1009 */ 1010 } else 1011 offset = 0; 1012 1013 preempt_disable(); 1014 mod = __module_address(value); 1015 if (mod) { 1016 ret = 1; 1017 modname = mod->name; 1018 #if IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID) 1019 if (modbuildid) 1020 buildid = mod->build_id; 1021 #endif 1022 if (offset) { 1023 base = (unsigned long)mod->core_layout.base; 1024 offset = value - base; 1025 } 1026 } 1027 1028 preempt_enable(); 1029 if (!ret) 1030 return 0; 1031 1032 /* address belongs to module */ 1033 if (offset) 1034 len = sprintf(buf, "0x%lx+0x%lx", base, offset); 1035 else 1036 len = sprintf(buf, "0x%lx", value); 1037 1038 len += sprintf(buf + len, " [%s", modname); 1039 #if IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID) 1040 if (modbuildid && buildid) { 1041 /* build ID should match length of sprintf */ 1042 static_assert(sizeof(typeof_member(struct module, build_id)) == 20); 1043 len += sprintf(buf + len, " %20phN", buildid); 1044 } 1045 #endif 1046 len += sprintf(buf + len, "]"); 1047 1048 return len; 1049 } 1050 #else 1051 static inline int sprint_module_info(char *buf, char *end, unsigned long value, 1052 const char *fmt) 1053 { 1054 return 0; 1055 } 1056 #endif 1057 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org