Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

module: Constify parameters of module_enforce_rwx_sections()

Minor cleanup, this is a non-functional change.

Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20250306131430.7016-2-petr.pavlu@suse.com
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>

+6 -4
+3 -2
kernel/module/internal.h
··· 322 322 int module_enable_rodata_ro_after_init(const struct module *mod); 323 323 int module_enable_data_nx(const struct module *mod); 324 324 int module_enable_text_rox(const struct module *mod); 325 - int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, 326 - char *secstrings, struct module *mod); 325 + int module_enforce_rwx_sections(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, 326 + const char *secstrings, 327 + const struct module *mod); 327 328 328 329 #ifdef CONFIG_MODULE_SIG 329 330 int module_sig_check(struct load_info *info, int flags);
+3 -2
kernel/module/strict_rwx.c
··· 87 87 return 0; 88 88 } 89 89 90 - int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, 91 - char *secstrings, struct module *mod) 90 + int module_enforce_rwx_sections(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, 91 + const char *secstrings, 92 + const struct module *mod) 92 93 { 93 94 const unsigned long shf_wx = SHF_WRITE | SHF_EXECINSTR; 94 95 int i;