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 4D8CEC4332F for ; Tue, 25 Jan 2022 15:35:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 11B246B008C; Tue, 25 Jan 2022 10:35:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A3AB6B0092; Tue, 25 Jan 2022 10:35:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E5E8A6B0093; Tue, 25 Jan 2022 10:35:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0129.hostedemail.com [216.40.44.129]) by kanga.kvack.org (Postfix) with ESMTP id D51466B008C for ; Tue, 25 Jan 2022 10:35:09 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 6F58F182AD9DE for ; Tue, 25 Jan 2022 15:35:09 +0000 (UTC) X-FDA: 79069207938.10.ED7FEFD Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by imf05.hostedemail.com (Postfix) with ESMTP id 8A35410000C for ; Tue, 25 Jan 2022 15:35:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643124907; x=1674660907; h=date:from:to:cc:subject:message-id:mime-version; bh=j57HyKDfSyFtjV4akb32UZAggdRkC9DaG32m8orF8Z8=; b=KHuU+o9dlgXoXqcrYAHUpbvMVgeUtfAt+vqFMowgQ0sOrxizHU+EnSZG LZyNM0e886WmpuBDyNZpGtAO9RkaLsVUAmn8ttzYdULl7sUVq4BigXR92 RlQ0ex/hMtzuhDuNvjxFgFYxoQ9TqxxkeMt9/NOuL5zoYSYF0Ivo88xLl PwR3wHzN3hoSj3w7A7srSS6FaCQ2kxivdWgw349bRzkwO6XaZzGanf7tg 1GY0+0j9/ExmpYQE+OGM8IjzLod7jUa/MhYQcWqnL7yWcwGVzZkD2ohev PgC5dwJ6L+UScyzFzRuMKLTB5nZmGj+QENLNOQZUb7xj3Hpzv/rtOX1kv w==; X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="246111201" X-IronPort-AV: E=Sophos;i="5.88,315,1635231600"; d="scan'208";a="246111201" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2022 07:35:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,315,1635231600"; d="scan'208";a="695871009" Received: from lkp-server01.sh.intel.com (HELO 276f1b88eecb) ([10.239.97.150]) by orsmga005.jf.intel.com with ESMTP; 25 Jan 2022 07:35:04 -0800 Received: from kbuild by 276f1b88eecb with local (Exim 4.92) (envelope-from ) id 1nCNqZ-000K5l-VE; Tue, 25 Jan 2022 15:35:03 +0000 Date: Tue, 25 Jan 2022 23:34:47 +0800 From: kernel test robot To: Kees Cook Cc: kbuild-all@lists.01.org, Linux Memory Management List Subject: [linux-next:master 1565/1734] include/linux/fortify-string.h:98:19: error: initializer element is not constant Message-ID: <202201252321.dRmWZ8wW-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 8A35410000C X-Rspam-User: nil Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=KHuU+o9d; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf05.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.24) smtp.mailfrom=lkp@intel.com X-Stat-Signature: mm9t13m3tixqn7x46jz361ignn9q5xqn X-HE-Tag: 1643124907-583728 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: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: d25ee88530253138d0b20d43511ca5acbda4e9f7 commit: 6303361147fc8984dd259b54c189592cd0551ab6 [1565/1734] fortify: Work around Clang inlining bugs config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220125/202201252321.dRmWZ8wW-lkp@intel.com/config) compiler: aarch64-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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=6303361147fc8984dd259b54c189592cd0551ab6 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 6303361147fc8984dd259b54c189592cd0551ab6 # 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=arm64 SHELL=/bin/bash drivers/firmware/ lib// If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from include/linux/string.h:253, from include/linux/bitmap.h:11, from include/linux/cpumask.h:12, from include/linux/smp.h:13, from arch/arm64/include/asm/arch_timer.h:18, from arch/arm64/include/asm/timex.h:8, from include/linux/timex.h:65, from include/linux/time32.h:13, from include/linux/time.h:60, from arch/arm64/include/asm/stat.h:12, from include/linux/stat.h:6, from include/linux/module.h:13, from drivers/firmware/xilinx/zynqmp-debug.c:14: >> include/linux/fortify-string.h:98:19: error: initializer element is not constant 98 | #define strlen(p) __fortify_strlen(p, __builtin_object_size(p, 1)) | ^~~~~~~~~~~~~~~~ drivers/firmware/xilinx/zynqmp-debug.c:32:44: note: in expansion of macro 'strlen' 32 | #define PM_API(id) {id, #id, strlen(#id)} | ^~~~~~ drivers/firmware/xilinx/zynqmp-debug.c:34:9: note: in expansion of macro 'PM_API' 34 | PM_API(PM_GET_API_VERSION), | ^~~~~~ include/linux/fortify-string.h:98:19: note: (near initialization for 'pm_api_list[0].api_name_len') 98 | #define strlen(p) __fortify_strlen(p, __builtin_object_size(p, 1)) | ^~~~~~~~~~~~~~~~ drivers/firmware/xilinx/zynqmp-debug.c:32:44: note: in expansion of macro 'strlen' 32 | #define PM_API(id) {id, #id, strlen(#id)} | ^~~~~~ drivers/firmware/xilinx/zynqmp-debug.c:34:9: note: in expansion of macro 'PM_API' 34 | PM_API(PM_GET_API_VERSION), | ^~~~~~ >> include/linux/fortify-string.h:98:19: error: initializer element is not constant 98 | #define strlen(p) __fortify_strlen(p, __builtin_object_size(p, 1)) | ^~~~~~~~~~~~~~~~ drivers/firmware/xilinx/zynqmp-debug.c:32:44: note: in expansion of macro 'strlen' 32 | #define PM_API(id) {id, #id, strlen(#id)} | ^~~~~~ drivers/firmware/xilinx/zynqmp-debug.c:35:9: note: in expansion of macro 'PM_API' 35 | PM_API(PM_QUERY_DATA), | ^~~~~~ include/linux/fortify-string.h:98:19: note: (near initialization for 'pm_api_list[1].api_name_len') 98 | #define strlen(p) __fortify_strlen(p, __builtin_object_size(p, 1)) | ^~~~~~~~~~~~~~~~ drivers/firmware/xilinx/zynqmp-debug.c:32:44: note: in expansion of macro 'strlen' 32 | #define PM_API(id) {id, #id, strlen(#id)} | ^~~~~~ drivers/firmware/xilinx/zynqmp-debug.c:35:9: note: in expansion of macro 'PM_API' 35 | PM_API(PM_QUERY_DATA), | ^~~~~~ vim +98 include/linux/fortify-string.h 96 97 /* defined after fortified strnlen to reuse it. */ > 98 #define strlen(p) __fortify_strlen(p, __builtin_object_size(p, 1)) 99 __FORTIFY_INLINE __kernel_size_t __fortify_strlen(const char *p, const size_t p_size) 100 { 101 __kernel_size_t ret; 102 103 /* Give up if we don't know how large p is. */ 104 if (p_size == (size_t)-1) 105 return __underlying_strlen(p); 106 ret = strnlen(p, p_size); 107 if (p_size <= ret) 108 fortify_panic(__func__); 109 return ret; 110 } 111 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org