Skip to content

Commit 7bba316

Browse files
committed
module: Constify parameters of module_enforce_rwx_sections()
Minor cleanup, this is a non-functional change. Reviewed-by: Sami Tolvanen <[email protected]> Reviewed-by: Luis Chamberlain <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Petr Pavlu <[email protected]>
1 parent 82f2b0b commit 7bba316

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

kernel/module/internal.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,9 @@ int module_enable_rodata_ro(const struct module *mod);
322322
int module_enable_rodata_ro_after_init(const struct module *mod);
323323
int module_enable_data_nx(const struct module *mod);
324324
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);
327328

328329
#ifdef CONFIG_MODULE_SIG
329330
int module_sig_check(struct load_info *info, int flags);

kernel/module/strict_rwx.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ int module_enable_data_nx(const struct module *mod)
8787
return 0;
8888
}
8989

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)
9293
{
9394
const unsigned long shf_wx = SHF_WRITE | SHF_EXECINSTR;
9495
int i;

0 commit comments

Comments
 (0)