All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
To: kbuild-all@lists.01.org
Subject: Re: [linux-next:master 6560/14009] arch/arm/kernel/module-plts.c:26:2: error: use of undeclared identifier 'FTRACE_ADDR'
Date: Thu, 01 Jul 2021 15:08:07 +0200	[thread overview]
Message-ID: <35d12988-6d26-bd7c-c236-ff78e0cfef01@nokia.com> (raw)
In-Reply-To: <202107011205.9FEDdb2T-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 6693 bytes --]

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(a)lists.01.org
> 

-- 
Best regards,
Alexander Sverdlin.

WARNING: multiple messages have this Message-ID (diff)
From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	kernel test robot <lkp@intel.com>
Subject: Re: [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 15:08:07 +0200	[thread overview]
Message-ID: <35d12988-6d26-bd7c-c236-ff78e0cfef01@nokia.com> (raw)
In-Reply-To: <202107011205.9FEDdb2T-lkp@intel.com>

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.


  reply	other threads:[~2021-07-01 13:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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  4:36 ` kernel test robot
2021-07-01 13:08 ` Alexander Sverdlin [this message]
2021-07-01 13:08   ` Alexander Sverdlin
2021-07-01 13:59   ` Russell King
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=35d12988-6d26-bd7c-c236-ff78e0cfef01@nokia.com \
    --to=alexander.sverdlin@nokia.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.