]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
module: Constify parameters of module_enforce_rwx_sections()
authorPetr Pavlu <petr.pavlu@suse.com>
Thu, 6 Mar 2025 13:13:52 +0000 (14:13 +0100)
committerPetr Pavlu <petr.pavlu@suse.com>
Sun, 18 May 2025 11:56:21 +0000 (13:56 +0200)
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>
kernel/module/internal.h
kernel/module/strict_rwx.c

index 626cf8668a7eb9202fce13d631f39429a4fe0ace..e7ab2a2e7a322249dcaf90e20da48beaf3902069 100644 (file)
@@ -322,8 +322,9 @@ int module_enable_rodata_ro(const struct module *mod);
 int module_enable_rodata_ro_after_init(const struct module *mod);
 int module_enable_data_nx(const struct module *mod);
 int module_enable_text_rox(const struct module *mod);
-int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
-                               char *secstrings, struct module *mod);
+int module_enforce_rwx_sections(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
+                               const char *secstrings,
+                               const struct module *mod);
 
 #ifdef CONFIG_MODULE_SIG
 int module_sig_check(struct load_info *info, int flags);
index 03f4142cfbf4e3a35f9112c2cb5a252d5c4a7568..9c20a2f3eaa427ade96ace5aeb60097d10785bed 100644 (file)
@@ -87,8 +87,9 @@ int module_enable_data_nx(const struct module *mod)
        return 0;
 }
 
-int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
-                               char *secstrings, struct module *mod)
+int module_enforce_rwx_sections(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
+                               const char *secstrings,
+                               const struct module *mod)
 {
        const unsigned long shf_wx = SHF_WRITE | SHF_EXECINSTR;
        int i;