lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202204191145.r47XhEcN-lkp@intel.com>
Date:   Tue, 19 Apr 2022 11:05:23 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [mingo-tip:sched/headers 1637/2356] include/linux/export.h:19:21:
 warning: excess elements in struct initializer

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head:   af93551cf39027d176f30b9beafc60a4c130998a
commit: 7056b88fee812761b8c015f328951fa1f7522a75 [1637/2356] headers/deps: syscalls: Optimize <linux/syscalls.h> dependencies
config: x86_64-randconfig-a005-20220418 (https://download.01.org/0day-ci/archive/20220419/202204191145.r47XhEcN-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=7056b88fee812761b8c015f328951fa1f7522a75
        git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
        git fetch --no-tags mingo-tip sched/headers
        git checkout 7056b88fee812761b8c015f328951fa1f7522a75
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/cpu/sgx/ drivers/cxl/core/ drivers/gpu/drm/dp/ drivers/gpu/drm/i915/gvt/ drivers/platform/x86/intel/uncore-frequency/ drivers/virt/ fs/ubifs/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   arch/x86/kernel/cpu/sgx/driver.c: In function 'sgx_open':
   arch/x86/kernel/cpu/sgx/driver.c:48:13: error: invalid use of undefined type 'struct file'
      48 |         file->private_data = encl;
         |             ^~
   arch/x86/kernel/cpu/sgx/driver.c: In function 'sgx_release':
   arch/x86/kernel/cpu/sgx/driver.c:55:37: error: invalid use of undefined type 'struct file'
      55 |         struct sgx_encl *encl = file->private_data;
         |                                     ^~
   arch/x86/kernel/cpu/sgx/driver.c: In function 'sgx_mmap':
   arch/x86/kernel/cpu/sgx/driver.c:95:37: error: invalid use of undefined type 'struct file'
      95 |         struct sgx_encl *encl = file->private_data;
         |                                     ^~
   arch/x86/kernel/cpu/sgx/driver.c: At top level:
   arch/x86/kernel/cpu/sgx/driver.c:136:21: error: variable 'sgx_encl_fops' has initializer but incomplete type
     136 | static const struct file_operations sgx_encl_fops = {
         |                     ^~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/sgx/driver.c:137:10: error: 'const struct file_operations' has no member named 'owner'
     137 |         .owner                  = THIS_MODULE,
         |          ^~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/printk.h:7,
                    from include/asm-generic/bug.h:22,
                    from arch/x86/include/asm/bug.h:87,
                    from include/linux/bug.h:5,
                    from include/linux/lockdep.h:14,
                    from include/linux/lockdep_api.h:1,
                    from include/linux/timer.h:5,
                    from include/linux/srcu_types.h:19,
                    from include/linux/srcu.h:19,
                    from arch/x86/kernel/cpu/sgx/driver.c:4:
>> include/linux/export.h:19:21: warning: excess elements in struct initializer
      19 | #define THIS_MODULE ((struct module *)0)
         |                     ^
   arch/x86/kernel/cpu/sgx/driver.c:137:35: note: in expansion of macro 'THIS_MODULE'
     137 |         .owner                  = THIS_MODULE,
         |                                   ^~~~~~~~~~~
   include/linux/export.h:19:21: note: (near initialization for 'sgx_encl_fops')
      19 | #define THIS_MODULE ((struct module *)0)
         |                     ^
   arch/x86/kernel/cpu/sgx/driver.c:137:35: note: in expansion of macro 'THIS_MODULE'
     137 |         .owner                  = THIS_MODULE,
         |                                   ^~~~~~~~~~~
   arch/x86/kernel/cpu/sgx/driver.c:138:10: error: 'const struct file_operations' has no member named 'open'
     138 |         .open                   = sgx_open,
         |          ^~~~
>> arch/x86/kernel/cpu/sgx/driver.c:138:35: warning: excess elements in struct initializer
     138 |         .open                   = sgx_open,
         |                                   ^~~~~~~~
   arch/x86/kernel/cpu/sgx/driver.c:138:35: note: (near initialization for 'sgx_encl_fops')
   arch/x86/kernel/cpu/sgx/driver.c:139:10: error: 'const struct file_operations' has no member named 'release'
     139 |         .release                = sgx_release,
         |          ^~~~~~~
   arch/x86/kernel/cpu/sgx/driver.c:139:35: warning: excess elements in struct initializer
     139 |         .release                = sgx_release,
         |                                   ^~~~~~~~~~~
   arch/x86/kernel/cpu/sgx/driver.c:139:35: note: (near initialization for 'sgx_encl_fops')
   arch/x86/kernel/cpu/sgx/driver.c:140:10: error: 'const struct file_operations' has no member named 'unlocked_ioctl'
     140 |         .unlocked_ioctl         = sgx_ioctl,
         |          ^~~~~~~~~~~~~~
   arch/x86/kernel/cpu/sgx/driver.c:140:35: warning: excess elements in struct initializer
     140 |         .unlocked_ioctl         = sgx_ioctl,
         |                                   ^~~~~~~~~
   arch/x86/kernel/cpu/sgx/driver.c:140:35: note: (near initialization for 'sgx_encl_fops')
   arch/x86/kernel/cpu/sgx/driver.c:142:10: error: 'const struct file_operations' has no member named 'compat_ioctl'
     142 |         .compat_ioctl           = sgx_compat_ioctl,
         |          ^~~~~~~~~~~~
   arch/x86/kernel/cpu/sgx/driver.c:142:35: warning: excess elements in struct initializer
     142 |         .compat_ioctl           = sgx_compat_ioctl,
         |                                   ^~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/sgx/driver.c:142:35: note: (near initialization for 'sgx_encl_fops')
   arch/x86/kernel/cpu/sgx/driver.c:144:10: error: 'const struct file_operations' has no member named 'mmap'
     144 |         .mmap                   = sgx_mmap,
         |          ^~~~
   arch/x86/kernel/cpu/sgx/driver.c:144:35: warning: excess elements in struct initializer
     144 |         .mmap                   = sgx_mmap,
         |                                   ^~~~~~~~
   arch/x86/kernel/cpu/sgx/driver.c:144:35: note: (near initialization for 'sgx_encl_fops')
   arch/x86/kernel/cpu/sgx/driver.c:145:10: error: 'const struct file_operations' has no member named 'get_unmapped_area'
     145 |         .get_unmapped_area      = sgx_get_unmapped_area,
         |          ^~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/sgx/driver.c:145:35: warning: excess elements in struct initializer
     145 |         .get_unmapped_area      = sgx_get_unmapped_area,
         |                                   ^~~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/sgx/driver.c:145:35: note: (near initialization for 'sgx_encl_fops')
   arch/x86/kernel/cpu/sgx/driver.c:136:37: error: storage size of 'sgx_encl_fops' isn't known
     136 | static const struct file_operations sgx_encl_fops = {
         |                                     ^~~~~~~~~~~~~


vim +19 include/linux/export.h

b67067f1176df6 Nicholas Piggin 2016-08-24   4  
f50169324df4ad Paul Gortmaker  2011-05-23   5  /*
f50169324df4ad Paul Gortmaker  2011-05-23   6   * Export symbols from the kernel to modules.  Forked from module.h
f50169324df4ad Paul Gortmaker  2011-05-23   7   * to reduce the amount of pointless cruft we feed to gcc when only
f50169324df4ad Paul Gortmaker  2011-05-23   8   * exporting a simple symbol or two.
f50169324df4ad Paul Gortmaker  2011-05-23   9   *
b92021b09df70c Rusty Russell   2013-03-15  10   * Try not to add #includes here.  It slows compilation and makes kernel
b92021b09df70c Rusty Russell   2013-03-15  11   * hackers place grumpy comments in header files.
f50169324df4ad Paul Gortmaker  2011-05-23  12   */
f50169324df4ad Paul Gortmaker  2011-05-23  13  
b92021b09df70c Rusty Russell   2013-03-15  14  #ifndef __ASSEMBLY__
f50169324df4ad Paul Gortmaker  2011-05-23  15  #ifdef MODULE
f50169324df4ad Paul Gortmaker  2011-05-23  16  extern struct module __this_module;
f50169324df4ad Paul Gortmaker  2011-05-23  17  #define THIS_MODULE (&__this_module)
f50169324df4ad Paul Gortmaker  2011-05-23  18  #else
f50169324df4ad Paul Gortmaker  2011-05-23 @19  #define THIS_MODULE ((struct module *)0)
f50169324df4ad Paul Gortmaker  2011-05-23  20  #endif
f50169324df4ad Paul Gortmaker  2011-05-23  21  

:::::: The code at line 19 was first introduced by commit
:::::: f50169324df4ad942e544386d136216c8617636a module.h: split out the EXPORT_SYMBOL into export.h

:::::: TO: Paul Gortmaker <paul.gortmaker@...driver.com>
:::::: CC: Paul Gortmaker <paul.gortmaker@...driver.com>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ