tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 33267d4a7f512d371a3ea853568832174be4caba commit: e1f556835f4fdc766bbd0d4a44f3bbeb64671d1a [1343/1343] module: limit enabling module.sig_enforce config: arm64-randconfig-r113-20241223 (https://download.01.org/0day-ci/archive/20241224/202412242304.vlx7BMb1-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce: (https://download.01.org/0day-ci/archive/20241224/202412242304.vlx7BMb1-lkp@i...)
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/202412242304.vlx7BMb1-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
kernel/module.c:275:6: sparse: sparse: symbol 'set_module_sig_enforced' was not declared. Should it be static?
kernel/module.c:3984:41: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/module.c:3984:41: sparse: struct mod_kallsyms [noderef] __rcu * kernel/module.c:3984:41: sparse: struct mod_kallsyms * kernel/module.c:4119:28: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/module.c:4119:28: sparse: struct mod_kallsyms [noderef] __rcu * kernel/module.c:4119:28: sparse: struct mod_kallsyms * kernel/module.c:4138:41: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/module.c:4138:41: sparse: struct mod_kallsyms [noderef] __rcu * kernel/module.c:4138:41: sparse: struct mod_kallsyms * kernel/module.c:275:6: warning: no previous prototype for 'set_module_sig_enforced' [-Wmissing-prototypes] 275 | void set_module_sig_enforced(void) | ^~~~~~~~~~~~~~~~~~~~~~~ kernel/module.c:4457:6: warning: no previous prototype for 'module_layout' [-Wmissing-prototypes] 4457 | void module_layout(struct module *mod, | ^~~~~~~~~~~~~ kernel/module.c: In function 'add_sect_attrs': kernel/module.c:1516:17: warning: array subscript 0 is outside array bounds of 'struct module_sect_attr[0]' [-Warray-bounds=] 1516 | sattr = §_attrs->attrs[0]; | ^~~~~~~~~~~~~~~~~~~~~ kernel/module.c:1471:33: note: while referencing 'attrs' 1471 | struct module_sect_attr attrs[0]; | ^~~~~ In function 'free_sect_attrs', inlined from 'add_sect_attrs' at kernel/module.c:1543:2: kernel/module.c:1488:40: warning: array subscript section is outside array bounds of 'struct module_sect_attr[0]' [-Warray-bounds=] 1488 | kfree(sect_attrs->attrs[section].name); | ~~~~~~~~~~~~~~~~~^~~~~~~~~ kernel/module.c: In function 'add_sect_attrs': kernel/module.c:1471:33: note: while referencing 'attrs' 1471 | struct module_sect_attr attrs[0]; | ^~~~~ kernel/module.c: In function 'add_notes_attrs': kernel/module.c:1617:17: warning: array subscript 0 is outside array bounds of 'struct bin_attribute[0]' [-Warray-bounds=] 1617 | nattr = ¬es_attrs->attrs[0]; | ^~~~~~~~~~~~~~~~~~~~~~ kernel/module.c:1565:30: note: while referencing 'attrs' 1565 | struct bin_attribute attrs[0]; | ^~~~~ kernel/module.c:1639:43: warning: array subscript i is outside array bounds of 'struct bin_attribute[0]' [-Warray-bounds=] 1639 | ¬es_attrs->attrs[i])) | ^~~~~~~~~~~~~~~~~~~~~~ kernel/module.c:1565:30: note: while referencing 'attrs' 1565 | struct bin_attribute attrs[0]; | ^~~~~ In function 'free_notes_attrs', inlined from 'add_notes_attrs' at kernel/module.c:1646:2: kernel/module.c:1585:47: warning: array subscript i is outside array bounds of 'struct bin_attribute[0]' [-Warray-bounds=] 1585 | ¬es_attrs->attrs[i]); | ^~~~~~~~~~~~~~~~~~~~~~ kernel/module.c: In function 'add_notes_attrs': kernel/module.c:1565:30: note: while referencing 'attrs' 1565 | struct bin_attribute attrs[0]; | ^~~~~ kernel/module.c:1623:66: warning: array subscript loaded is outside array bounds of 'struct module_sect_attr[0]' [-Warray-bounds=] 1623 | nattr->attr.name = mod->sect_attrs->attrs[loaded].name; | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ kernel/module.c:1471:33: note: while referencing 'attrs' 1471 | struct module_sect_attr attrs[0]; | ^~~~~ In function 'free_notes_attrs', inlined from 'remove_notes_attrs' at kernel/module.c:1652:3, inlined from 'mod_sysfs_fini' at kernel/module.c:1852:2, inlined from 'mod_sysfs_teardown' at kernel/module.c:1895:2, inlined from 'free_module' at kernel/module.c:2171:2: kernel/module.c:1585:47: warning: array subscript i is outside array bounds of 'struct bin_attribute[0]' [-Warray-bounds=] 1585 | ¬es_attrs->attrs[i]); | ^~~~~~~~~~~~~~~~~~~~~~ kernel/module.c: In function 'free_module': kernel/module.c:1565:30: note: while referencing 'attrs' 1565 | struct bin_attribute attrs[0]; | ^~~~~ In function 'free_sect_attrs', inlined from 'remove_sect_attrs' at kernel/module.c:1553:3, inlined from 'mod_sysfs_fini' at kernel/module.c:1853:2, inlined from 'mod_sysfs_teardown' at kernel/module.c:1895:2, inlined from 'free_module' at kernel/module.c:2171:2: kernel/module.c:1488:40: warning: array subscript section is outside array bounds of 'struct module_sect_attr[0]' [-Warray-bounds=] 1488 | kfree(sect_attrs->attrs[section].name); | ~~~~~~~~~~~~~~~~~^~~~~~~~~ kernel/module.c: In function 'free_module': kernel/module.c:1471:33: note: while referencing 'attrs' 1471 | struct module_sect_attr attrs[0]; | ^~~~~
vim +/set_module_sig_enforced +275 kernel/module.c
274
275 void set_module_sig_enforced(void)
276 { 277 sig_enforce = true; 278 } 279 #else 280 #define sig_enforce false 281 #endif 282