From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8344780101441263923==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [RFC PATCH v4 06/13] module: Move strict rwx support to a separate file Date: Mon, 31 Jan 2022 08:30:54 +0800 Message-ID: <202201310846.HImoX0UC-lkp@intel.com> In-Reply-To: <20220130213214.1042497-7-atomlin@redhat.com> List-Id: --===============8344780101441263923== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Aaron, [FYI, it's a private test report for your RFC patch.] [auto build test ERROR on a97ac8cb24a3c3ad74794adb83717ef1605d1b47] url: https://github.com/0day-ci/linux/commits/Aaron-Tomlin/module-core-c= ode-clean-up/20220131-053513 base: a97ac8cb24a3c3ad74794adb83717ef1605d1b47 config: alpha-defconfig (https://download.01.org/0day-ci/archive/20220131/2= 02201310846.HImoX0UC-lkp(a)intel.com/config) compiler: alpha-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/742710509e2dfa52ca8af5e17= 03124f620a51b6a git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Aaron-Tomlin/module-core-code-clea= n-up/20220131-053513 git checkout 742710509e2dfa52ca8af5e1703124f620a51b6a # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dalpha SHELL=3D/bin/bash arch/alpha/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from include/linux/device/driver.h:21, from include/linux/device.h:32, from include/linux/blk_types.h:11, from include/linux/writeback.h:13, from include/linux/memcontrol.h:22, from include/linux/swap.h:9, from arch/alpha/mm/init.c:20: include/linux/module.h: In function 'is_livepatch_module': include/linux/module.h:708:26: error: 'struct module' has no member name= d 'klp'; did you mean 'kp'? 708 | if (mod->klp) | ^~~ | kp include/linux/module.h: In function 'set_livepatch_module': include/linux/module.h:717:22: error: 'struct module' has no member name= d 'klp'; did you mean 'kp'? 717 | mod->klp =3D true; | ^~~ | kp arch/alpha/mm/init.c: At top level: arch/alpha/mm/init.c:261:1: error: no previous prototype for 'srm_paging= _stop' [-Werror=3Dmissing-prototypes] 261 | srm_paging_stop (void) | ^~~~~~~~~~~~~~~ In file included from include/linux/device/driver.h:21, from include/linux/device.h:32, from include/linux/blk_types.h:11, from include/linux/writeback.h:13, from include/linux/memcontrol.h:22, from include/linux/swap.h:9, from arch/alpha/mm/init.c:20: >> include/linux/module.h:374:12: error: 'module_enforce_rwx_sections' defi= ned but not used [-Werror=3Dunused-function] 374 | static int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *= sechdrs, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/module.h:373:13: error: 'module_enable_ro' defined but not= used [-Werror=3Dunused-function] 373 | static void module_enable_ro(const struct module *mod, bool afte= r_init) {} | ^~~~~~~~~~~~~~~~ >> include/linux/module.h:372:13: error: 'module_enable_nx' defined but not= used [-Werror=3Dunused-function] 372 | static void module_enable_nx(const struct module *mod) { } | ^~~~~~~~~~~~~~~~ include/linux/module.h:356:13: error: 'module_enable_x' defined but not = used [-Werror=3Dunused-function] 356 | static void module_enable_x(const struct module *mod) { } | ^~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- In file included from include/linux/kallsyms.h:14, from include/linux/ftrace.h:12, from include/linux/perf_event.h:49, from arch/alpha/mm/fault.c:28: include/linux/module.h: In function 'is_livepatch_module': include/linux/module.h:708:26: error: 'struct module' has no member name= d 'klp'; did you mean 'kp'? 708 | if (mod->klp) | ^~~ | kp include/linux/module.h: In function 'set_livepatch_module': include/linux/module.h:717:22: error: 'struct module' has no member name= d 'klp'; did you mean 'kp'? 717 | mod->klp =3D true; | ^~~ | kp arch/alpha/mm/fault.c: At top level: arch/alpha/mm/fault.c:85:1: error: no previous prototype for 'do_page_fa= ult' [-Werror=3Dmissing-prototypes] 85 | do_page_fault(unsigned long address, unsigned long mmcsr, | ^~~~~~~~~~~~~ In file included from include/linux/kallsyms.h:14, from include/linux/ftrace.h:12, from include/linux/perf_event.h:49, from arch/alpha/mm/fault.c:28: >> include/linux/module.h:374:12: error: 'module_enforce_rwx_sections' defi= ned but not used [-Werror=3Dunused-function] 374 | static int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *= sechdrs, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/module.h:373:13: error: 'module_enable_ro' defined but not= used [-Werror=3Dunused-function] 373 | static void module_enable_ro(const struct module *mod, bool afte= r_init) {} | ^~~~~~~~~~~~~~~~ >> include/linux/module.h:372:13: error: 'module_enable_nx' defined but not= used [-Werror=3Dunused-function] 372 | static void module_enable_nx(const struct module *mod) { } | ^~~~~~~~~~~~~~~~ include/linux/module.h:356:13: error: 'module_enable_x' defined but not = used [-Werror=3Dunused-function] 356 | static void module_enable_x(const struct module *mod) { } | ^~~~~~~~~~~~~~~ cc1: all warnings being treated as errors vim +/module_enforce_rwx_sections +374 include/linux/module.h 358 = 359 #ifdef CONFIG_STRICT_MODULE_RWX 360 extern void frob_rodata(const struct module_layout *layout, 361 int (*set_memory)(unsigned long start, int num_pages)); 362 extern void frob_ro_after_init(const struct module_layout *layout, 363 int (*set_memory)(unsigned long start, int num_pages)); 364 extern void frob_writable_data(const struct module_layout *layout, 365 int (*set_memory)(unsigned long start, int num_pages)); 366 extern void module_enable_ro(const struct module *mod, bool after_in= it); 367 extern void module_enable_nx(const struct module *mod); 368 extern int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sech= drs, 369 char *secstrings, struct module *mod); 370 = 371 #else /* !CONFIG_STRICT_MODULE_RWX */ > 372 static void module_enable_nx(const struct module *mod) { } > 373 static void module_enable_ro(const struct module *mod, bool after_in= it) {} > 374 static int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sech= drs, 375 char *secstrings, struct module *mod) 376 { 377 return 0; 378 } 379 #endif /* CONFIG_STRICT_MODULE_RWX */ 380 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============8344780101441263923==--