From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-next:master 1565/1734] include/linux/fortify-string.h:98:19: error: initializer element is not constant
Date: Tue, 25 Jan 2022 23:34:47 +0800 [thread overview]
Message-ID: <202201252321.dRmWZ8wW-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5119 bytes --]
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(a)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 <lkp@intel.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Kees Cook <keescook@chromium.org>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 1565/1734] include/linux/fortify-string.h:98:19: error: initializer element is not constant
Date: Tue, 25 Jan 2022 23:34:47 +0800 [thread overview]
Message-ID: <202201252321.dRmWZ8wW-lkp@intel.com> (raw)
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 <lkp@intel.com>
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
next reply other threads:[~2022-01-25 15:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-25 15:34 kernel test robot [this message]
2022-01-25 15:34 ` [linux-next:master 1565/1734] include/linux/fortify-string.h:98:19: error: initializer element is not constant kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202201252321.dRmWZ8wW-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.