summaryrefslogtreecommitdiffstats
path: root/kernel/module/strict_rwx.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2023-12-21 08:24:24 +0100
committerLuis Chamberlain <mcgrof@kernel.org>2024-01-29 12:00:31 -0800
commit3559ad395bf02f3dee576dc9acab4ce330ce57b5 (patch)
tree26cda2aea32a4b592c28723953e20035e7283492 /kernel/module/strict_rwx.c
parentac88ee7d2b87c1f93b89fd9ce5911c2ab2bda816 (diff)
downloadlinux-stable-3559ad395bf02f3dee576dc9acab4ce330ce57b5.tar.gz
linux-stable-3559ad395bf02f3dee576dc9acab4ce330ce57b5.tar.bz2
linux-stable-3559ad395bf02f3dee576dc9acab4ce330ce57b5.zip
module: Change module_enable_{nx/x/ro}() to more explicit names
It's a bit puzzling to see a call to module_enable_nx() followed by a call to module_enable_x(). This is because one applies on text while the other applies on data. Change name to make that more clear. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/module/strict_rwx.c')
-rw-r--r--kernel/module/strict_rwx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/module/strict_rwx.c b/kernel/module/strict_rwx.c
index 9345b09f28a5..9b2d58a8d59d 100644
--- a/kernel/module/strict_rwx.c
+++ b/kernel/module/strict_rwx.c
@@ -26,7 +26,7 @@ static void module_set_memory(const struct module *mod, enum mod_mem_type type,
* CONFIG_STRICT_MODULE_RWX because they are needed regardless of whether we
* are strict.
*/
-void module_enable_rox(const struct module *mod)
+void module_enable_text_rox(const struct module *mod)
{
for_class_mod_mem_type(type, text) {
if (IS_ENABLED(CONFIG_STRICT_MODULE_RWX))
@@ -36,7 +36,7 @@ void module_enable_rox(const struct module *mod)
}
}
-void module_enable_ro(const struct module *mod, bool after_init)
+void module_enable_rodata_ro(const struct module *mod, bool after_init)
{
if (!IS_ENABLED(CONFIG_STRICT_MODULE_RWX))
return;
@@ -52,7 +52,7 @@ void module_enable_ro(const struct module *mod, bool after_init)
module_set_memory(mod, MOD_RO_AFTER_INIT, set_memory_ro);
}
-void module_enable_nx(const struct module *mod)
+void module_enable_data_nx(const struct module *mod)
{
if (!IS_ENABLED(CONFIG_STRICT_MODULE_RWX))
return;