diff options
author | Petr Pavlu <petr.pavlu@suse.com> | 2025-03-06 14:13:52 +0100 |
---|---|---|
committer | Petr Pavlu <petr.pavlu@suse.com> | 2025-05-18 13:56:21 +0200 |
commit | 7bba3167c08a3bebda6e5fcc0179482b4517ba5b (patch) | |
tree | 1903db9081741a07e22cc009aca9d78735e200c7 | |
parent | 82f2b0b97b36ee3fcddf0f0780a9a0825d52fec3 (diff) |
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>
-rw-r--r-- | kernel/module/internal.h | 5 | ||||
-rw-r--r-- | kernel/module/strict_rwx.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/kernel/module/internal.h b/kernel/module/internal.h index 626cf8668a7e..e7ab2a2e7a32 100644 --- a/kernel/module/internal.h +++ b/kernel/module/internal.h @@ -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); diff --git a/kernel/module/strict_rwx.c b/kernel/module/strict_rwx.c index 03f4142cfbf4..9c20a2f3eaa4 100644 --- a/kernel/module/strict_rwx.c +++ b/kernel/module/strict_rwx.c @@ -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; |