Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH 1/5] alloc_tag: load module tags into separate continuous memory
       [not found] <20240819151512.2363698-2-surenb@google.com>
@ 2024-08-22 17:10 ` kernel test robot
  2024-08-22 20:39   ` Suren Baghdasaryan
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-08-22 17:10 UTC (permalink / raw)
  To: Suren Baghdasaryan, akpm
  Cc: llvm, oe-kbuild-all, kent.overstreet, corbet, arnd, mcgrof, rppt,
	paulmck, thuth, tglx, bp, xiongwei.song, ardb, david, vbabka,
	mhocko, hannes, roman.gushchin, dave, willy, liam.howlett,
	pasha.tatashin, souravpanda, keescook, dennis, jhubbard, yuzhao,
	vvvvvv, rostedt, iamjoonsoo.kim, rientjes

Hi Suren,

kernel test robot noticed the following build errors:

[auto build test ERROR on 651c8c1d735983040bec4f71d0e2e690f3c0fc2d]

url:    https://github.com/intel-lab-lkp/linux/commits/Suren-Baghdasaryan/alloc_tag-load-module-tags-into-separate-continuous-memory/20240819-231747
base:   651c8c1d735983040bec4f71d0e2e690f3c0fc2d
patch link:    https://lore.kernel.org/r/20240819151512.2363698-2-surenb%40google.com
patch subject: [PATCH 1/5] alloc_tag: load module tags into separate continuous memory
config: s390-randconfig-001-20240822 (https://download.01.org/0day-ci/archive/20240823/202408230020.U02tOvjb-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 26670e7fa4f032a019d23d56c6a02926e854e8af)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240823/202408230020.U02tOvjb-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408230020.U02tOvjb-lkp@intel.com/

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

   In file included from lib/alloc_tag.c:3:
   In file included from include/linux/execmem.h:6:
   In file included from include/linux/moduleloader.h:6:
   In file included from include/linux/module.h:19:
   In file included from include/linux/elf.h:6:
   In file included from arch/s390/include/asm/elf.h:181:
   In file included from arch/s390/include/asm/mmu_context.h:11:
   In file included from arch/s390/include/asm/pgalloc.h:18:
   In file included from include/linux/mm.h:2199:
   include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     505 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     512 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     524 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     525 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> lib/alloc_tag.c:16:22: warning: tentative definition of variable with internal linkage has incomplete non-array type 'struct module' [-Wtentative-definition-incomplete-type]
      16 | static struct module unloaded_mod;
         |                      ^
   include/linux/printk.h:358:8: note: forward declaration of 'struct module'
     358 | struct module;
         |        ^
   lib/alloc_tag.c:18:22: warning: tentative definition of variable with internal linkage has incomplete non-array type 'struct module' [-Wtentative-definition-incomplete-type]
      18 | static struct module prepend_mod;
         |                      ^
   include/linux/printk.h:358:8: note: forward declaration of 'struct module'
     358 | struct module;
         |        ^
>> lib/alloc_tag.c:16:22: error: tentative definition has type 'struct module' that is never completed
      16 | static struct module unloaded_mod;
         |                      ^
   include/linux/printk.h:358:8: note: forward declaration of 'struct module'
     358 | struct module;
         |        ^
   lib/alloc_tag.c:18:22: error: tentative definition has type 'struct module' that is never completed
      18 | static struct module prepend_mod;
         |                      ^
   include/linux/printk.h:358:8: note: forward declaration of 'struct module'
     358 | struct module;
         |        ^
   6 warnings and 2 errors generated.


vim +16 lib/alloc_tag.c

    11	
    12	static struct codetag_type *alloc_tag_cttype;
    13	static struct alloc_tag_module_section module_tags;
    14	static struct maple_tree mod_area_mt = MTREE_INIT(mod_area_mt, MT_FLAGS_ALLOC_RANGE);
    15	/* A dummy object used to indicate an unloaded module */
  > 16	static struct module unloaded_mod;
    17	/* A dummy object used to indicate a module prepended area */
    18	static struct module prepend_mod;
    19	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/5] alloc_tag: load module tags into separate continuous memory
  2024-08-22 17:10 ` [PATCH 1/5] alloc_tag: load module tags into separate continuous memory kernel test robot
@ 2024-08-22 20:39   ` Suren Baghdasaryan
  0 siblings, 0 replies; 2+ messages in thread
From: Suren Baghdasaryan @ 2024-08-22 20:39 UTC (permalink / raw)
  To: kernel test robot
  Cc: akpm, llvm, oe-kbuild-all, kent.overstreet, corbet, arnd, mcgrof,
	rppt, paulmck, thuth, tglx, bp, xiongwei.song, ardb, david,
	vbabka, mhocko, hannes, roman.gushchin, dave, willy, liam.howlett,
	pasha.tatashin, souravpanda, keescook, dennis, jhubbard, yuzhao,
	vvvvvv, rostedt, iamjoonsoo.kim, rientjes

On Thu, Aug 22, 2024 at 10:10 AM kernel test robot <lkp@intel.com> wrote:
>
> Hi Suren,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on 651c8c1d735983040bec4f71d0e2e690f3c0fc2d]
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Suren-Baghdasaryan/alloc_tag-load-module-tags-into-separate-continuous-memory/20240819-231747
> base:   651c8c1d735983040bec4f71d0e2e690f3c0fc2d
> patch link:    https://lore.kernel.org/r/20240819151512.2363698-2-surenb%40google.com
> patch subject: [PATCH 1/5] alloc_tag: load module tags into separate continuous memory
> config: s390-randconfig-001-20240822 (https://download.01.org/0day-ci/archive/20240823/202408230020.U02tOvjb-lkp@intel.com/config)
> compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 26670e7fa4f032a019d23d56c6a02926e854e8af)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240823/202408230020.U02tOvjb-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202408230020.U02tOvjb-lkp@intel.com/
>
> All error/warnings (new ones prefixed by >>):
>
>    In file included from lib/alloc_tag.c:3:
>    In file included from include/linux/execmem.h:6:
>    In file included from include/linux/moduleloader.h:6:
>    In file included from include/linux/module.h:19:
>    In file included from include/linux/elf.h:6:
>    In file included from arch/s390/include/asm/elf.h:181:
>    In file included from arch/s390/include/asm/mmu_context.h:11:
>    In file included from arch/s390/include/asm/pgalloc.h:18:
>    In file included from include/linux/mm.h:2199:
>    include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
>      504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
>          |                            ~~~~~~~~~~~~~~~~~~~~~ ^
>      505 |                            item];
>          |                            ~~~~
>    include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
>      511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
>          |                            ~~~~~~~~~~~~~~~~~~~~~ ^
>      512 |                            NR_VM_NUMA_EVENT_ITEMS +
>          |                            ~~~~~~~~~~~~~~~~~~~~~~
>    include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
>      518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
>          |                               ~~~~~~~~~~~ ^ ~~~
>    include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
>      524 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
>          |                            ~~~~~~~~~~~~~~~~~~~~~ ^
>      525 |                            NR_VM_NUMA_EVENT_ITEMS +
>          |                            ~~~~~~~~~~~~~~~~~~~~~~
> >> lib/alloc_tag.c:16:22: warning: tentative definition of variable with internal linkage has incomplete non-array type 'struct module' [-Wtentative-definition-incomplete-type]
>       16 | static struct module unloaded_mod;

Same issue here. I need to fix CONFIG_MODULES=n config.

>          |                      ^
>    include/linux/printk.h:358:8: note: forward declaration of 'struct module'
>      358 | struct module;
>          |        ^
>    lib/alloc_tag.c:18:22: warning: tentative definition of variable with internal linkage has incomplete non-array type 'struct module' [-Wtentative-definition-incomplete-type]
>       18 | static struct module prepend_mod;
>          |                      ^
>    include/linux/printk.h:358:8: note: forward declaration of 'struct module'
>      358 | struct module;
>          |        ^
> >> lib/alloc_tag.c:16:22: error: tentative definition has type 'struct module' that is never completed
>       16 | static struct module unloaded_mod;
>          |                      ^
>    include/linux/printk.h:358:8: note: forward declaration of 'struct module'
>      358 | struct module;
>          |        ^
>    lib/alloc_tag.c:18:22: error: tentative definition has type 'struct module' that is never completed
>       18 | static struct module prepend_mod;
>          |                      ^
>    include/linux/printk.h:358:8: note: forward declaration of 'struct module'
>      358 | struct module;
>          |        ^
>    6 warnings and 2 errors generated.
>
>
> vim +16 lib/alloc_tag.c
>
>     11
>     12  static struct codetag_type *alloc_tag_cttype;
>     13  static struct alloc_tag_module_section module_tags;
>     14  static struct maple_tree mod_area_mt = MTREE_INIT(mod_area_mt, MT_FLAGS_ALLOC_RANGE);
>     15  /* A dummy object used to indicate an unloaded module */
>   > 16  static struct module unloaded_mod;
>     17  /* A dummy object used to indicate a module prepended area */
>     18  static struct module prepend_mod;
>     19
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-22 20:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20240819151512.2363698-2-surenb@google.com>
2024-08-22 17:10 ` [PATCH 1/5] alloc_tag: load module tags into separate continuous memory kernel test robot
2024-08-22 20:39   ` Suren Baghdasaryan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox