From: kernel test robot <lkp@intel.com>
To: Alex Sverdlin <alexander.sverdlin@nokia.com>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Subject: [linux-next:master 6560/14009] arch/arm/kernel/module-plts.c:26:2: error: use of undeclared identifier 'FTRACE_ADDR'
Date: Thu, 1 Jul 2021 12:36:13 +0800 [thread overview]
Message-ID: <202107011205.9FEDdb2T-lkp@intel.com> (raw)
[-- 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 --]
next reply other threads:[~2021-07-01 4:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-01 4:36 kernel test robot [this message]
2021-07-01 13:08 ` [linux-next:master 6560/14009] arch/arm/kernel/module-plts.c:26:2: error: use of undeclared identifier 'FTRACE_ADDR' Alexander Sverdlin
2021-07-01 13:59 ` Russell King (Oracle)
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=202107011205.9FEDdb2T-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexander.sverdlin@nokia.com \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=rmk+kernel@armlinux.org.uk \
/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 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).