diff mbox series

[1/3] module: Constify parameters of module_enforce_rwx_sections()

Message ID 20241223093840.29417-2-petr.pavlu@suse.com (mailing list archive)
State New
Headers show
Series module: Make .static_call_sites read-only after init | expand

Commit Message

Petr Pavlu Dec. 23, 2024, 9:37 a.m. UTC
Minor cleanup, this is a non-functional change.

Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
---
 kernel/module/internal.h   | 5 +++--
 kernel/module/strict_rwx.c | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/kernel/module/internal.h b/kernel/module/internal.h
index daef2be83902..7e78f6a8e85e 100644
--- a/kernel/module/internal.h
+++ b/kernel/module/internal.h
@@ -330,8 +330,9 @@  static inline struct module *mod_find(unsigned long addr, struct mod_tree_root *
 int module_enable_rodata_ro(const struct module *mod, bool after_init);
 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 239e5013359d..d1c43309bb25 100644
--- a/kernel/module/strict_rwx.c
+++ b/kernel/module/strict_rwx.c
@@ -81,8 +81,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;