From: Petr Pavlu <petr.pavlu@suse.com>
To: Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Sami Tolvanen <samitolvanen@google.com>,
Daniel Gomez <da.gomez@samsung.com>,
Peter Zijlstra <peterz@infradead.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Jason Baron <jbaron@akamai.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ard Biesheuvel <ardb@kernel.org>
Cc: linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] module: Constify parameters of module_enforce_rwx_sections()
Date: Mon, 23 Dec 2024 10:37:47 +0100 [thread overview]
Message-ID: <20241223093840.29417-2-petr.pavlu@suse.com> (raw)
In-Reply-To: <20241223093840.29417-1-petr.pavlu@suse.com>
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 --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;
--
2.43.0
next prev parent reply other threads:[~2024-12-23 9:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-23 9:37 [PATCH 0/3] module: Make .static_call_sites read-only after init Petr Pavlu
2024-12-23 9:37 ` Petr Pavlu [this message]
2024-12-23 9:37 ` [PATCH 2/3] module: Add a separate function to mark sections as " Petr Pavlu
2024-12-23 9:37 ` [PATCH 3/3] module: Make .static_call_sites " Petr Pavlu
2025-01-03 14:06 ` [PATCH 0/3] " Christophe Leroy
2025-01-03 16:24 ` Petr Pavlu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241223093840.29417-2-petr.pavlu@suse.com \
--to=petr.pavlu@suse.com \
--cc=ardb@kernel.org \
--cc=da.gomez@samsung.com \
--cc=jbaron@akamai.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=samitolvanen@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®