All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Stephen Boyd <swboyd@chromium.org>
Cc: kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [linux-next:master 2759/2770] include/linux/kernel.h:53:43: error: dereferencing pointer to incomplete type 'struct module'
Date: Thu, 13 May 2021 16:50:19 +0800	[thread overview]
Message-ID: <202105131615.Wgj7dLWI-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ec2618180c3450d06a6a4ba951d4c9a2c689b517
commit: 39a85add9ea5d011d1b109d8af183f048936ee0f [2759/2770] module: add printk formats to add module build ID to stacktraces
config: nios2-randconfig-r003-20210513 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=39a85add9ea5d011d1b109d8af183f048936ee0f
        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 39a85add9ea5d011d1b109d8af183f048936ee0f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=nios2 

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 >>):

   kernel/kallsyms.c: In function 'kallsyms_lookup_size_offset':
   kernel/kallsyms.c:310:11: error: too many arguments to function 'module_address_lookup'
     310 |  return !!module_address_lookup(addr, symbolsize, offset, NULL, NULL, namebuf) ||
         |           ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kallsyms.h:14,
                    from kernel/kallsyms.c:15:
   include/linux/module.h:745:27: note: declared here
     745 | static inline const char *module_address_lookup(unsigned long addr,
         |                           ^~~~~~~~~~~~~~~~~~~~~
   kernel/kallsyms.c: At top level:
   kernel/kallsyms.c:314:13: warning: no previous prototype for 'kallsyms_lookup_buildid' [-Wmissing-prototypes]
     314 | const char *kallsyms_lookup_buildid(unsigned long addr, unsigned long *symbolsize,
         |             ^~~~~~~~~~~~~~~~~~~~~~~
   kernel/kallsyms.c: In function 'kallsyms_lookup_buildid':
   kernel/kallsyms.c:341:18: error: passing argument 5 of 'module_address_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types]
     341 |         modname, modbuildid, namebuf);
         |                  ^~~~~~~~~~
         |                  |
         |                  const unsigned char **
   In file included from include/linux/kallsyms.h:14,
                    from kernel/kallsyms.c:15:
   include/linux/module.h:749:14: note: expected 'char *' but argument is of type 'const unsigned char **'
     749 |        char *namebuf)
         |        ~~~~~~^~~~~~~
   kernel/kallsyms.c:340:8: error: too many arguments to function 'module_address_lookup'
     340 |  ret = module_address_lookup(addr, symbolsize, offset,
         |        ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kallsyms.h:14,
                    from kernel/kallsyms.c:15:
   include/linux/module.h:745:27: note: declared here
     745 | static inline const char *module_address_lookup(unsigned long addr,
         |                           ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/bits.h:22,
                    from include/linux/bitops.h:6,
                    from include/linux/kernel.h:12,
                    from include/linux/cpumask.h:10,
                    from include/linux/mm_types_task.h:14,
                    from include/linux/mm_types.h:5,
                    from include/linux/buildid.h:5,
                    from include/linux/kallsyms.h:10,
                    from kernel/kallsyms.c:15:
   kernel/kallsyms.c: In function '__sprint_symbol':
>> include/linux/kernel.h:53:43: error: dereferencing pointer to incomplete type 'struct module'
      53 | #define typeof_member(T, m) typeof(((T*)0)->m)
         |                                           ^~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   kernel/kallsyms.c:454:4: note: in expansion of macro 'static_assert'
     454 |    static_assert(sizeof(typeof_member(struct module, build_id)) == 20);
         |    ^~~~~~~~~~~~~
   kernel/kallsyms.c:454:25: note: in expansion of macro 'typeof_member'
     454 |    static_assert(sizeof(typeof_member(struct module, build_id)) == 20);
         |                         ^~~~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(typeof_member(struct module, build_id)) == 20"
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ^~~~~~~~~~~~~~~
   kernel/kallsyms.c:454:4: note: in expansion of macro 'static_assert'
     454 |    static_assert(sizeof(typeof_member(struct module, build_id)) == 20);
         |    ^~~~~~~~~~~~~
   kernel/kallsyms.c: At top level:
   kernel/kallsyms.c:570:12: warning: no previous prototype for 'arch_get_kallsym' [-Wmissing-prototypes]
     570 | int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value,
         |            ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +53 include/linux/kernel.h

3ed605bc8a0a68 Gustavo Padovan 2016-04-26  52  
ce251e0e3c0597 Alexey Dobriyan 2019-07-16 @53  #define typeof_member(T, m)	typeof(((T*)0)->m)
ce251e0e3c0597 Alexey Dobriyan 2019-07-16  54  

:::::: The code at line 53 was first introduced by commit
:::::: ce251e0e3c0597ea8cab5787df579bd1f9c1aca1 include/linux/kernel.h: add typeof_member() macro

:::::: TO: Alexey Dobriyan <adobriyan@gmail.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
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: 31530 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-next:master 2759/2770] include/linux/kernel.h:53:43: error: dereferencing pointer to incomplete type 'struct module'
Date: Thu, 13 May 2021 16:50:19 +0800	[thread overview]
Message-ID: <202105131615.Wgj7dLWI-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ec2618180c3450d06a6a4ba951d4c9a2c689b517
commit: 39a85add9ea5d011d1b109d8af183f048936ee0f [2759/2770] module: add printk formats to add module build ID to stacktraces
config: nios2-randconfig-r003-20210513 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=39a85add9ea5d011d1b109d8af183f048936ee0f
        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 39a85add9ea5d011d1b109d8af183f048936ee0f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=nios2 

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 >>):

   kernel/kallsyms.c: In function 'kallsyms_lookup_size_offset':
   kernel/kallsyms.c:310:11: error: too many arguments to function 'module_address_lookup'
     310 |  return !!module_address_lookup(addr, symbolsize, offset, NULL, NULL, namebuf) ||
         |           ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kallsyms.h:14,
                    from kernel/kallsyms.c:15:
   include/linux/module.h:745:27: note: declared here
     745 | static inline const char *module_address_lookup(unsigned long addr,
         |                           ^~~~~~~~~~~~~~~~~~~~~
   kernel/kallsyms.c: At top level:
   kernel/kallsyms.c:314:13: warning: no previous prototype for 'kallsyms_lookup_buildid' [-Wmissing-prototypes]
     314 | const char *kallsyms_lookup_buildid(unsigned long addr, unsigned long *symbolsize,
         |             ^~~~~~~~~~~~~~~~~~~~~~~
   kernel/kallsyms.c: In function 'kallsyms_lookup_buildid':
   kernel/kallsyms.c:341:18: error: passing argument 5 of 'module_address_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types]
     341 |         modname, modbuildid, namebuf);
         |                  ^~~~~~~~~~
         |                  |
         |                  const unsigned char **
   In file included from include/linux/kallsyms.h:14,
                    from kernel/kallsyms.c:15:
   include/linux/module.h:749:14: note: expected 'char *' but argument is of type 'const unsigned char **'
     749 |        char *namebuf)
         |        ~~~~~~^~~~~~~
   kernel/kallsyms.c:340:8: error: too many arguments to function 'module_address_lookup'
     340 |  ret = module_address_lookup(addr, symbolsize, offset,
         |        ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kallsyms.h:14,
                    from kernel/kallsyms.c:15:
   include/linux/module.h:745:27: note: declared here
     745 | static inline const char *module_address_lookup(unsigned long addr,
         |                           ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/bits.h:22,
                    from include/linux/bitops.h:6,
                    from include/linux/kernel.h:12,
                    from include/linux/cpumask.h:10,
                    from include/linux/mm_types_task.h:14,
                    from include/linux/mm_types.h:5,
                    from include/linux/buildid.h:5,
                    from include/linux/kallsyms.h:10,
                    from kernel/kallsyms.c:15:
   kernel/kallsyms.c: In function '__sprint_symbol':
>> include/linux/kernel.h:53:43: error: dereferencing pointer to incomplete type 'struct module'
      53 | #define typeof_member(T, m) typeof(((T*)0)->m)
         |                                           ^~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   kernel/kallsyms.c:454:4: note: in expansion of macro 'static_assert'
     454 |    static_assert(sizeof(typeof_member(struct module, build_id)) == 20);
         |    ^~~~~~~~~~~~~
   kernel/kallsyms.c:454:25: note: in expansion of macro 'typeof_member'
     454 |    static_assert(sizeof(typeof_member(struct module, build_id)) == 20);
         |                         ^~~~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(typeof_member(struct module, build_id)) == 20"
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ^~~~~~~~~~~~~~~
   kernel/kallsyms.c:454:4: note: in expansion of macro 'static_assert'
     454 |    static_assert(sizeof(typeof_member(struct module, build_id)) == 20);
         |    ^~~~~~~~~~~~~
   kernel/kallsyms.c: At top level:
   kernel/kallsyms.c:570:12: warning: no previous prototype for 'arch_get_kallsym' [-Wmissing-prototypes]
     570 | int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value,
         |            ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +53 include/linux/kernel.h

3ed605bc8a0a68 Gustavo Padovan 2016-04-26  52  
ce251e0e3c0597 Alexey Dobriyan 2019-07-16 @53  #define typeof_member(T, m)	typeof(((T*)0)->m)
ce251e0e3c0597 Alexey Dobriyan 2019-07-16  54  

:::::: The code at line 53 was first introduced by commit
:::::: ce251e0e3c0597ea8cab5787df579bd1f9c1aca1 include/linux/kernel.h: add typeof_member() macro

:::::: TO: Alexey Dobriyan <adobriyan@gmail.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31530 bytes --]

             reply	other threads:[~2021-05-13  8:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13  8:50 kernel test robot [this message]
2021-05-13  8:50 ` [linux-next:master 2759/2770] include/linux/kernel.h:53:43: error: dereferencing pointer to incomplete type 'struct module' kernel test robot

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=202105131615.Wgj7dLWI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=swboyd@chromium.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.