Re: [PATCH bpf] treewide: add missing includes masked by cgroup -> bpf dependency

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

 



Hi Jakub,

I love your patch! Yet something to improve:

[auto build test ERROR on bpf/master]

url:    https://github.com/0day-ci/linux/commits/Jakub-Kicinski/treewide-add-missing-includes-masked-by-cgroup-bpf-dependency/20211120-115325
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git master
config: riscv-rv32_defconfig (attached as .config)
compiler: riscv32-linux-gcc (GCC) 11.2.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://github.com/0day-ci/linux/commit/e31b3bdd266ef8f63543f27cf7493e98112fd74a
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jakub-Kicinski/treewide-add-missing-includes-masked-by-cgroup-bpf-dependency/20211120-115325
        git checkout e31b3bdd266ef8f63543f27cf7493e98112fd74a
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv 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 >>):

   In file included from arch/riscv/include/asm/module.h:7,
                    from include/linux/module.h:33,
                    from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/riscv/include/asm/cacheinfo.h:9,
                    from arch/riscv/include/asm/elf.h:14,
                    from include/linux/elf.h:6,
                    from arch/riscv/kernel/ptrace.c:16:
   include/asm-generic/module.h:33:25: error: unknown type name 'Elf32_Shdr'
      33 | #define Elf_Shdr        Elf32_Shdr
         |                         ^~~~~~~~~~
   arch/riscv/include/asm/module.h:15:9: note: in expansion of macro 'Elf_Shdr'
      15 |         Elf_Shdr *shdr;
         |         ^~~~~~~~
   In file included from include/linux/module.h:33,
                    from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/riscv/include/asm/cacheinfo.h:9,
                    from arch/riscv/include/asm/elf.h:14,
                    from include/linux/elf.h:6,
                    from arch/riscv/kernel/ptrace.c:16:
   arch/riscv/include/asm/module.h: In function 'get_got_entry':
   arch/riscv/include/asm/module.h:38:63: error: request for member 'sh_addr' in something not a structure or union
      38 |         struct got_entry *got = (struct got_entry *)(sec->shdr->sh_addr);
         |                                                               ^~
   arch/riscv/include/asm/module.h: In function 'get_got_plt_idx':
   arch/riscv/include/asm/module.h:91:66: error: request for member 'sh_addr' in something not a structure or union
      91 |         struct got_entry *got_plt = (struct got_entry *)sec->shdr->sh_addr;
         |                                                                  ^~
   arch/riscv/include/asm/module.h: In function 'get_plt_entry':
   arch/riscv/include/asm/module.h:104:66: error: request for member 'sh_addr' in something not a structure or union
     104 |         struct plt_entry *plt = (struct plt_entry *)sec_plt->shdr->sh_addr;
         |                                                                  ^~
   In file included from arch/riscv/include/asm/module.h:7,
                    from include/linux/module.h:33,
                    from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/riscv/include/asm/cacheinfo.h:9,
                    from arch/riscv/include/asm/elf.h:14,
                    from include/linux/elf.h:6,
                    from arch/riscv/kernel/ptrace.c:16:
   include/linux/module.h: At top level:
>> include/asm-generic/module.h:35:25: error: unknown type name 'Elf32_Sym'
      35 | #define Elf_Sym         Elf32_Sym
         |                         ^~~~~~~~~
   include/linux/module.h:349:9: note: in expansion of macro 'Elf_Sym'
     349 |         Elf_Sym *symtab;
         |         ^~~~~~~
>> include/asm-generic/module.h:35:25: error: unknown type name 'Elf32_Sym'
      35 | #define Elf_Sym         Elf32_Sym
         |                         ^~~~~~~~~
   include/linux/module.h:547:57: note: in expansion of macro 'Elf_Sym'
     547 | static inline unsigned long kallsyms_symbol_value(const Elf_Sym *sym)
         |                                                         ^~~~~~~
   In file included from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/riscv/include/asm/cacheinfo.h:9,
                    from arch/riscv/include/asm/elf.h:14,
                    from include/linux/elf.h:6,
                    from arch/riscv/kernel/ptrace.c:16:
   include/linux/module.h: In function 'kallsyms_symbol_value':
   include/linux/module.h:549:19: error: request for member 'st_value' in something not a structure or union
     549 |         return sym->st_value;
         |                   ^~
   In file included from arch/riscv/include/asm/module.h:7,
                    from include/linux/module.h:33,
                    from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/riscv/include/asm/cacheinfo.h:9,
                    from arch/riscv/include/asm/elf.h:14,
                    from include/linux/elf.h:6,
                    from arch/riscv/kernel/ptrace.c:16:
   include/linux/module.h: At top level:
   include/asm-generic/module.h:37:25: error: unknown type name 'Elf32_Ehdr'
      37 | #define Elf_Ehdr        Elf32_Ehdr
         |                         ^~~~~~~~~~
   include/linux/module.h:835:32: note: in expansion of macro 'Elf_Ehdr'
     835 | void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *,
         |                                ^~~~~~~~
   include/asm-generic/module.h:33:25: error: unknown type name 'Elf32_Shdr'
      33 | #define Elf_Shdr        Elf32_Shdr
         |                         ^~~~~~~~~~
   include/linux/module.h:835:50: note: in expansion of macro 'Elf_Shdr'
     835 | void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *,
         |                                                  ^~~~~~~~
--
   In file included from arch/riscv/include/asm/module.h:7,
                    from include/linux/module.h:33,
                    from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/riscv/include/asm/cacheinfo.h:9,
                    from arch/riscv/include/asm/elf.h:14,
                    from include/linux/elf.h:6,
                    from arch/riscv/kernel/module-sections.c:8:
   include/asm-generic/module.h:33:25: error: unknown type name 'Elf32_Shdr'
      33 | #define Elf_Shdr        Elf32_Shdr
         |                         ^~~~~~~~~~
   arch/riscv/include/asm/module.h:15:9: note: in expansion of macro 'Elf_Shdr'
      15 |         Elf_Shdr *shdr;
         |         ^~~~~~~~
   In file included from include/linux/module.h:33,
                    from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/riscv/include/asm/cacheinfo.h:9,
                    from arch/riscv/include/asm/elf.h:14,
                    from include/linux/elf.h:6,
                    from arch/riscv/kernel/module-sections.c:8:
   arch/riscv/include/asm/module.h: In function 'get_got_entry':
   arch/riscv/include/asm/module.h:38:63: error: request for member 'sh_addr' in something not a structure or union
      38 |         struct got_entry *got = (struct got_entry *)(sec->shdr->sh_addr);
         |                                                               ^~
   arch/riscv/include/asm/module.h: In function 'get_got_plt_idx':
   arch/riscv/include/asm/module.h:91:66: error: request for member 'sh_addr' in something not a structure or union
      91 |         struct got_entry *got_plt = (struct got_entry *)sec->shdr->sh_addr;
         |                                                                  ^~
   arch/riscv/include/asm/module.h: In function 'get_plt_entry':
   arch/riscv/include/asm/module.h:104:66: error: request for member 'sh_addr' in something not a structure or union
     104 |         struct plt_entry *plt = (struct plt_entry *)sec_plt->shdr->sh_addr;
         |                                                                  ^~
   In file included from arch/riscv/include/asm/module.h:7,
                    from include/linux/module.h:33,
                    from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/riscv/include/asm/cacheinfo.h:9,
                    from arch/riscv/include/asm/elf.h:14,
                    from include/linux/elf.h:6,
                    from arch/riscv/kernel/module-sections.c:8:
   include/linux/module.h: At top level:
>> include/asm-generic/module.h:35:25: error: unknown type name 'Elf32_Sym'
      35 | #define Elf_Sym         Elf32_Sym
         |                         ^~~~~~~~~
   include/linux/module.h:349:9: note: in expansion of macro 'Elf_Sym'
     349 |         Elf_Sym *symtab;
         |         ^~~~~~~
>> include/asm-generic/module.h:35:25: error: unknown type name 'Elf32_Sym'
      35 | #define Elf_Sym         Elf32_Sym
         |                         ^~~~~~~~~
   include/linux/module.h:547:57: note: in expansion of macro 'Elf_Sym'
     547 | static inline unsigned long kallsyms_symbol_value(const Elf_Sym *sym)
         |                                                         ^~~~~~~
   In file included from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/riscv/include/asm/cacheinfo.h:9,
                    from arch/riscv/include/asm/elf.h:14,
                    from include/linux/elf.h:6,
                    from arch/riscv/kernel/module-sections.c:8:
   include/linux/module.h: In function 'kallsyms_symbol_value':
   include/linux/module.h:549:19: error: request for member 'st_value' in something not a structure or union
     549 |         return sym->st_value;
         |                   ^~
   In file included from arch/riscv/include/asm/module.h:7,
                    from include/linux/module.h:33,
                    from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/riscv/include/asm/cacheinfo.h:9,
                    from arch/riscv/include/asm/elf.h:14,
                    from include/linux/elf.h:6,
                    from arch/riscv/kernel/module-sections.c:8:
   include/linux/module.h: At top level:
   include/asm-generic/module.h:37:25: error: unknown type name 'Elf32_Ehdr'
      37 | #define Elf_Ehdr        Elf32_Ehdr
         |                         ^~~~~~~~~~
   include/linux/module.h:835:32: note: in expansion of macro 'Elf_Ehdr'
     835 | void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *,
         |                                ^~~~~~~~
   include/asm-generic/module.h:33:25: error: unknown type name 'Elf32_Shdr'
      33 | #define Elf_Shdr        Elf32_Shdr
         |                         ^~~~~~~~~~
   include/linux/module.h:835:50: note: in expansion of macro 'Elf_Shdr'
     835 | void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *,
         |                                                  ^~~~~~~~
   arch/riscv/kernel/module-sections.c: In function 'module_emit_got_entry':
   arch/riscv/kernel/module-sections.c:23:48: error: request for member 'sh_addr' in something not a structure or union
      23 |         got = (struct got_entry *)got_sec->shdr->sh_addr;
         |                                                ^~
   arch/riscv/kernel/module-sections.c: In function 'module_emit_plt_entry':
   arch/riscv/kernel/module-sections.c:44:56: error: request for member 'sh_addr' in something not a structure or union
      44 |         got_plt = (struct got_entry *)got_plt_sec->shdr->sh_addr;
         |                                                        ^~
   arch/riscv/kernel/module-sections.c:46:48: error: request for member 'sh_addr' in something not a structure or union
      46 |         plt = (struct plt_entry *)plt_sec->shdr->sh_addr;
         |                                                ^~
   arch/riscv/kernel/module-sections.c: In function 'module_frob_arch_sections':
>> arch/riscv/kernel/module-sections.c:102:44: error: assignment to 'int *' from incompatible pointer type 'Elf32_Shdr *' {aka 'struct elf32_shdr *'} [-Werror=incompatible-pointer-types]
     102 |                         mod->arch.plt.shdr = sechdrs + i;
         |                                            ^
   arch/riscv/kernel/module-sections.c:104:44: error: assignment to 'int *' from incompatible pointer type 'Elf32_Shdr *' {aka 'struct elf32_shdr *'} [-Werror=incompatible-pointer-types]
     104 |                         mod->arch.got.shdr = sechdrs + i;
         |                                            ^
   arch/riscv/kernel/module-sections.c:106:48: error: assignment to 'int *' from incompatible pointer type 'Elf32_Shdr *' {aka 'struct elf32_shdr *'} [-Werror=incompatible-pointer-types]
     106 |                         mod->arch.got_plt.shdr = sechdrs + i;
         |                                                ^
   arch/riscv/kernel/module-sections.c:138:27: error: request for member 'sh_type' in something not a structure or union
     138 |         mod->arch.plt.shdr->sh_type = SHT_NOBITS;
         |                           ^~
   arch/riscv/kernel/module-sections.c:139:27: error: request for member 'sh_flags' in something not a structure or union
     139 |         mod->arch.plt.shdr->sh_flags = SHF_EXECINSTR | SHF_ALLOC;
         |                           ^~
   arch/riscv/kernel/module-sections.c:140:27: error: request for member 'sh_addralign' in something not a structure or union
     140 |         mod->arch.plt.shdr->sh_addralign = L1_CACHE_BYTES;
         |                           ^~
   arch/riscv/kernel/module-sections.c:141:27: error: request for member 'sh_size' in something not a structure or union
     141 |         mod->arch.plt.shdr->sh_size = (num_plts + 1) * sizeof(struct plt_entry);
         |                           ^~
   arch/riscv/kernel/module-sections.c:145:27: error: request for member 'sh_type' in something not a structure or union
     145 |         mod->arch.got.shdr->sh_type = SHT_NOBITS;
         |                           ^~
   arch/riscv/kernel/module-sections.c:146:27: error: request for member 'sh_flags' in something not a structure or union
     146 |         mod->arch.got.shdr->sh_flags = SHF_ALLOC;
         |                           ^~
   arch/riscv/kernel/module-sections.c:147:27: error: request for member 'sh_addralign' in something not a structure or union
     147 |         mod->arch.got.shdr->sh_addralign = L1_CACHE_BYTES;
         |                           ^~
   arch/riscv/kernel/module-sections.c:148:27: error: request for member 'sh_size' in something not a structure or union
     148 |         mod->arch.got.shdr->sh_size = (num_gots + 1) * sizeof(struct got_entry);
         |                           ^~
   arch/riscv/kernel/module-sections.c:152:31: error: request for member 'sh_type' in something not a structure or union
     152 |         mod->arch.got_plt.shdr->sh_type = SHT_NOBITS;
         |                               ^~
   arch/riscv/kernel/module-sections.c:153:31: error: request for member 'sh_flags' in something not a structure or union
     153 |         mod->arch.got_plt.shdr->sh_flags = SHF_ALLOC;
         |                               ^~
   arch/riscv/kernel/module-sections.c:154:31: error: request for member 'sh_addralign' in something not a structure or union
     154 |         mod->arch.got_plt.shdr->sh_addralign = L1_CACHE_BYTES;
         |                               ^~
   arch/riscv/kernel/module-sections.c:155:31: error: request for member 'sh_size' in something not a structure or union
     155 |         mod->arch.got_plt.shdr->sh_size = (num_plts + 1) * sizeof(struct got_entry);
         |                               ^~
   cc1: some warnings being treated as errors


vim +/Elf32_Sym +35 include/asm-generic/module.h

786d35d45cc40b David Howells 2012-09-28  32  
aafe4dbed0bf6c Arnd Bergmann 2009-05-13  33  #define Elf_Shdr	Elf32_Shdr
786d35d45cc40b David Howells 2012-09-28  34  #define Elf_Phdr	Elf32_Phdr
aafe4dbed0bf6c Arnd Bergmann 2009-05-13 @35  #define Elf_Sym		Elf32_Sym
786d35d45cc40b David Howells 2012-09-28  36  #define Elf_Dyn		Elf32_Dyn
aafe4dbed0bf6c Arnd Bergmann 2009-05-13  37  #define Elf_Ehdr	Elf32_Ehdr
786d35d45cc40b David Howells 2012-09-28  38  #define Elf_Addr	Elf32_Addr
786d35d45cc40b David Howells 2012-09-28  39  #ifdef CONFIG_MODULES_USE_ELF_REL
786d35d45cc40b David Howells 2012-09-28  40  #define Elf_Rel		Elf32_Rel
786d35d45cc40b David Howells 2012-09-28  41  #endif
786d35d45cc40b David Howells 2012-09-28  42  #ifdef CONFIG_MODULES_USE_ELF_RELA
786d35d45cc40b David Howells 2012-09-28  43  #define Elf_Rela	Elf32_Rela
786d35d45cc40b David Howells 2012-09-28  44  #endif
786d35d45cc40b David Howells 2012-09-28  45  #define ELF_R_TYPE(X)	ELF32_R_TYPE(X)
786d35d45cc40b David Howells 2012-09-28  46  #define ELF_R_SYM(X)	ELF32_R_SYM(X)
aafe4dbed0bf6c Arnd Bergmann 2009-05-13  47  #endif
aafe4dbed0bf6c Arnd Bergmann 2009-05-13  48  

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux