[powerpc:test 26/49] arch/powerpc/include/asm/kprobes.h:79:16: error: 'MODULE_NAME_LEN' undeclared

kbuild test robot fengguang.wu at intel.com
Tue Jan 31 09:42:28 AEDT 2017


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git test
head:   675b1ff3778df243879ed2c58dfa80aeb1f9bf03
commit: ad581fb0a5d8a5a505a85e03a87ef14b8defa072 [26/49] powerpc/kprobes: Implement Optprobes
config: powerpc-allmodconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout ad581fb0a5d8a5a505a85e03a87ef14b8defa072
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/kprobes.h:45:0,
                    from arch/powerpc/kernel/optprobes.c:12:
   arch/powerpc/kernel/optprobes.c: In function 'arch_prepare_optimized_kprobe':
>> arch/powerpc/include/asm/kprobes.h:79:16: error: 'MODULE_NAME_LEN' undeclared (first use in this function)
     char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN];  \
                   ^
>> arch/powerpc/kernel/optprobes.c:230:2: note: in expansion of macro 'kprobe_lookup_name'
     kprobe_lookup_name("optimized_callback", op_callback_addr);
     ^~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/kprobes.h:79:16: note: each undeclared identifier is reported only once for each function it appears in
     char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN];  \
                   ^
>> arch/powerpc/kernel/optprobes.c:230:2: note: in expansion of macro 'kprobe_lookup_name'
     kprobe_lookup_name("optimized_callback", op_callback_addr);
     ^~~~~~~~~~~~~~~~~~
>> arch/powerpc/include/asm/kprobes.h:82:14: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     if ((modsym = strchr(name, ':')) != NULL) {   \
                 ^
>> arch/powerpc/kernel/optprobes.c:230:2: note: in expansion of macro 'kprobe_lookup_name'
     kprobe_lookup_name("optimized_callback", op_callback_addr);
     ^~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/kprobes.h:79:7: warning: unused variable 'dot_name' [-Wunused-variable]
     char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN];  \
          ^
>> arch/powerpc/kernel/optprobes.c:230:2: note: in expansion of macro 'kprobe_lookup_name'
     kprobe_lookup_name("optimized_callback", op_callback_addr);
     ^~~~~~~~~~~~~~~~~~
>> arch/powerpc/include/asm/kprobes.h:82:14: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     if ((modsym = strchr(name, ':')) != NULL) {   \
                 ^
   arch/powerpc/kernel/optprobes.c:231:2: note: in expansion of macro 'kprobe_lookup_name'
     kprobe_lookup_name("emulate_step", emulate_step_addr);
     ^~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/kprobes.h:79:7: warning: unused variable 'dot_name' [-Wunused-variable]
     char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN];  \
          ^
   arch/powerpc/kernel/optprobes.c:231:2: note: in expansion of macro 'kprobe_lookup_name'
     kprobe_lookup_name("emulate_step", emulate_step_addr);
     ^~~~~~~~~~~~~~~~~~

vim +/MODULE_NAME_LEN +79 arch/powerpc/include/asm/kprobes.h

bf794bf5 Naveen N. Rao 2014-12-15  73   *
bf794bf5 Naveen N. Rao 2014-12-15  74   * This ensures we always get to the actual symbol and not the descriptor.
bf794bf5 Naveen N. Rao 2014-12-15  75   * Also handle <module:symbol> format.
bf794bf5 Naveen N. Rao 2014-12-15  76   */
bf794bf5 Naveen N. Rao 2014-12-15  77  #define kprobe_lookup_name(name, addr)					\
bf794bf5 Naveen N. Rao 2014-12-15  78  {									\
bf794bf5 Naveen N. Rao 2014-12-15 @79  	char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN];		\
bf794bf5 Naveen N. Rao 2014-12-15  80  	char *modsym;							\
bf794bf5 Naveen N. Rao 2014-12-15  81  	bool dot_appended = false;					\
bf794bf5 Naveen N. Rao 2014-12-15 @82  	if ((modsym = strchr(name, ':')) != NULL) {			\
bf794bf5 Naveen N. Rao 2014-12-15  83  		modsym++;						\
bf794bf5 Naveen N. Rao 2014-12-15  84  		if (*modsym != '\0' && *modsym != '.') {		\
bf794bf5 Naveen N. Rao 2014-12-15  85  			/* Convert to <module:.symbol> */		\

:::::: The code at line 79 was first introduced by commit
:::::: bf794bf52a80c6278a028f0af2ca32d7c3508c9b powerpc/kprobes: Fix kallsyms lookup across powerpc ABIv1 and ABIv2

:::::: TO: Naveen N. Rao <naveen.n.rao at linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe at ellerman.id.au>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 51755 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20170131/05a0393c/attachment-0001.gz>


More information about the Linuxppc-dev mailing list