Re: [linux-next:master 6560/14009] arch/arm/kernel/module-plts.c:26:2: error: use of undeclared identifier 'FTRACE_ADDR'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> 
> 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@xxxxxxxxxxxx
> 

-- 
Best regards,
Alexander Sverdlin.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux