* [linux-next:master 6560/14009] arch/arm/kernel/module-plts.c:26:2: error: use of undeclared identifier 'FTRACE_ADDR'
@ 2021-07-01 4:36 kernel test robot
2021-07-01 13:08 ` Alexander Sverdlin
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-07-01 4:36 UTC (permalink / raw)
To: Alex Sverdlin
Cc: clang-built-linux, kbuild-all, Linux Memory Management List,
Russell King (Oracle)
[-- Attachment #1: Type: text/plain, Size: 6103 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 2e0046650f0f192a84a1793f0dc2f0991ed9a3e4
commit: 79f32b221b18c15a98507b101ef4beb52444cc6f [6560/14009] ARM: 9079/1: ftrace: Add MODULE_PLTS support
config: arm-randconfig-r003-20210630 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d21d5472501460933e78aead04cf59579025ba4)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=79f32b221b18c15a98507b101ef4beb52444cc6f
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 79f32b221b18c15a98507b101ef4beb52444cc6f
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/arm/kernel/module-plts.c:26:2: error: use of undeclared identifier 'FTRACE_ADDR'
FTRACE_ADDR,
^
>> arch/arm/kernel/module-plts.c:40:7: error: invalid application of 'sizeof' to an incomplete type 'const u32 []'
if (!ARRAY_SIZE(fixed_plts) || pltsec->plt_count)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~
arch/arm/kernel/module-plts.c:42:22: error: invalid application of 'sizeof' to an incomplete type 'const u32 []'
pltsec->plt_count = ARRAY_SIZE(fixed_plts);
^~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~
arch/arm/kernel/module-plts.c:47:21: error: invalid application of 'sizeof' to an incomplete type 'const u32 []'
BUILD_BUG_ON(sizeof(fixed_plts) > sizeof(plt->lit));
^~~~~~~~~~~~
include/linux/build_bug.h:50:19: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler_types.h:328:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:316:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:308:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
arch/arm/kernel/module-plts.c:48:37: error: invalid application of 'sizeof' to an incomplete type 'const u32 []'
memcpy(plt->lit, fixed_plts, sizeof(fixed_plts));
^~~~~~~~~~~~
arch/arm/kernel/module-plts.c:65:22: error: invalid application of 'sizeof' to an incomplete type 'const u32 []'
for (idx = 0; idx < ARRAY_SIZE(fixed_plts); ++idx)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~
arch/arm/kernel/module-plts.c:217:28: error: invalid application of 'sizeof' to an incomplete type 'const u32 []'
unsigned long core_plts = ARRAY_SIZE(fixed_plts);
^~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~
arch/arm/kernel/module-plts.c:218:28: error: invalid application of 'sizeof' to an incomplete type 'const u32 []'
unsigned long init_plts = ARRAY_SIZE(fixed_plts);
^~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~
8 errors generated.
vim +/FTRACE_ADDR +26 arch/arm/kernel/module-plts.c
23
24 static const u32 fixed_plts[] = {
25 #ifdef CONFIG_FUNCTION_TRACER
> 26 FTRACE_ADDR,
27 MCOUNT_ADDR,
28 #endif
29 };
30
31 static bool in_init(const struct module *mod, unsigned long loc)
32 {
33 return loc - (u32)mod->init_layout.base < mod->init_layout.size;
34 }
35
36 static void prealloc_fixed(struct mod_plt_sec *pltsec, struct plt_entries *plt)
37 {
38 int i;
39
> 40 if (!ARRAY_SIZE(fixed_plts) || pltsec->plt_count)
41 return;
42 pltsec->plt_count = ARRAY_SIZE(fixed_plts);
43
44 for (i = 0; i < ARRAY_SIZE(plt->ldr); ++i)
45 plt->ldr[i] = PLT_ENT_LDR;
46
47 BUILD_BUG_ON(sizeof(fixed_plts) > sizeof(plt->lit));
48 memcpy(plt->lit, fixed_plts, sizeof(fixed_plts));
49 }
50
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32531 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-next:master 6560/14009] arch/arm/kernel/module-plts.c:26:2: error: use of undeclared identifier 'FTRACE_ADDR'
2021-07-01 4:36 [linux-next:master 6560/14009] arch/arm/kernel/module-plts.c:26:2: error: use of undeclared identifier 'FTRACE_ADDR' kernel test robot
@ 2021-07-01 13:08 ` Alexander Sverdlin
2021-07-01 13:59 ` Russell King (Oracle)
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Sverdlin @ 2021-07-01 13:08 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: clang-built-linux, kbuild-all, Linux Memory Management List,
kernel test robot
Hello Russel,
this is a second report on the same problem, shall I add
https://www.spinics.net/lists/kernel/msg3968916.html
to your patch system?
On 01/07/2021 06:36, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 2e0046650f0f192a84a1793f0dc2f0991ed9a3e4
> commit: 79f32b221b18c15a98507b101ef4beb52444cc6f [6560/14009] ARM: 9079/1: ftrace: Add MODULE_PLTS support
> config: arm-randconfig-r003-20210630 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d21d5472501460933e78aead04cf59579025ba4)
> 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
> # install arm cross compiling tool for clang build
> # apt-get install binutils-arm-linux-gnueabi
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=79f32b221b18c15a98507b101ef4beb52444cc6f
> 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 79f32b221b18c15a98507b101ef4beb52444cc6f
> # save the attached .config to linux build tree
> mkdir build_dir
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>>> arch/arm/kernel/module-plts.c:26:2: error: use of undeclared identifier 'FTRACE_ADDR'
> FTRACE_ADDR,
> ^
>>> arch/arm/kernel/module-plts.c:40:7: error: invalid application of 'sizeof' to an incomplete type 'const u32 []'
> if (!ARRAY_SIZE(fixed_plts) || pltsec->plt_count)
> ^~~~~~~~~~~~~~~~~~~~~~
> include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
> #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
> ^~~~~
> arch/arm/kernel/module-plts.c:42:22: error: invalid application of 'sizeof' to an incomplete type 'const u32 []'
> pltsec->plt_count = ARRAY_SIZE(fixed_plts);
> ^~~~~~~~~~~~~~~~~~~~~~
> include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
> #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
> ^~~~~
> arch/arm/kernel/module-plts.c:47:21: error: invalid application of 'sizeof' to an incomplete type 'const u32 []'
> BUILD_BUG_ON(sizeof(fixed_plts) > sizeof(plt->lit));
> ^~~~~~~~~~~~
> include/linux/build_bug.h:50:19: note: expanded from macro 'BUILD_BUG_ON'
> BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
> ^~~~~~~~~
> include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> ^~~~
> include/linux/compiler_types.h:328:22: note: expanded from macro 'compiletime_assert'
> _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> ^~~~~~~~~
> include/linux/compiler_types.h:316:23: note: expanded from macro '_compiletime_assert'
> __compiletime_assert(condition, msg, prefix, suffix)
> ^~~~~~~~~
> include/linux/compiler_types.h:308:9: note: expanded from macro '__compiletime_assert'
> if (!(condition)) \
> ^~~~~~~~~
> arch/arm/kernel/module-plts.c:48:37: error: invalid application of 'sizeof' to an incomplete type 'const u32 []'
> memcpy(plt->lit, fixed_plts, sizeof(fixed_plts));
> ^~~~~~~~~~~~
> arch/arm/kernel/module-plts.c:65:22: error: invalid application of 'sizeof' to an incomplete type 'const u32 []'
> for (idx = 0; idx < ARRAY_SIZE(fixed_plts); ++idx)
> ^~~~~~~~~~~~~~~~~~~~~~
> include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
> #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
> ^~~~~
> arch/arm/kernel/module-plts.c:217:28: error: invalid application of 'sizeof' to an incomplete type 'const u32 []'
> unsigned long core_plts = ARRAY_SIZE(fixed_plts);
> ^~~~~~~~~~~~~~~~~~~~~~
> include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
> #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
> ^~~~~
> arch/arm/kernel/module-plts.c:218:28: error: invalid application of 'sizeof' to an incomplete type 'const u32 []'
> unsigned long init_plts = ARRAY_SIZE(fixed_plts);
> ^~~~~~~~~~~~~~~~~~~~~~
> include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
> #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
> ^~~~~
> 8 errors generated.
>
>
> vim +/FTRACE_ADDR +26 arch/arm/kernel/module-plts.c
>
> 23
> 24 static const u32 fixed_plts[] = {
> 25 #ifdef CONFIG_FUNCTION_TRACER
> > 26 FTRACE_ADDR,
> 27 MCOUNT_ADDR,
> 28 #endif
> 29 };
> 30
> 31 static bool in_init(const struct module *mod, unsigned long loc)
> 32 {
> 33 return loc - (u32)mod->init_layout.base < mod->init_layout.size;
> 34 }
> 35
> 36 static void prealloc_fixed(struct mod_plt_sec *pltsec, struct plt_entries *plt)
> 37 {
> 38 int i;
> 39
> > 40 if (!ARRAY_SIZE(fixed_plts) || pltsec->plt_count)
> 41 return;
> 42 pltsec->plt_count = ARRAY_SIZE(fixed_plts);
> 43
> 44 for (i = 0; i < ARRAY_SIZE(plt->ldr); ++i)
> 45 plt->ldr[i] = PLT_ENT_LDR;
> 46
> 47 BUILD_BUG_ON(sizeof(fixed_plts) > sizeof(plt->lit));
> 48 memcpy(plt->lit, fixed_plts, sizeof(fixed_plts));
> 49 }
> 50
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
--
Best regards,
Alexander Sverdlin.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-next:master 6560/14009] arch/arm/kernel/module-plts.c:26:2: error: use of undeclared identifier 'FTRACE_ADDR'
2021-07-01 13:08 ` Alexander Sverdlin
@ 2021-07-01 13:59 ` Russell King (Oracle)
0 siblings, 0 replies; 3+ messages in thread
From: Russell King (Oracle) @ 2021-07-01 13:59 UTC (permalink / raw)
To: Alexander Sverdlin
Cc: clang-built-linux, kbuild-all, Linux Memory Management List,
kernel test robot
On Thu, Jul 01, 2021 at 03:08:07PM +0200, Alexander Sverdlin wrote:
> Hello Russel,
>
> this is a second report on the same problem, shall I add
> https://www.spinics.net/lists/kernel/msg3968916.html
>
> to your patch system?
Yes, please do.
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-01 13:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-01 4:36 [linux-next:master 6560/14009] arch/arm/kernel/module-plts.c:26:2: error: use of undeclared identifier 'FTRACE_ADDR' kernel test robot
2021-07-01 13:08 ` Alexander Sverdlin
2021-07-01 13:59 ` Russell King (Oracle)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).