summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2020-04-29 10:24:51 -0500
committerJiri Kosina <jkosina@suse.cz>2020-05-08 00:12:43 +0200
commit0d9fbf78fefb421a3af97394ce80bba0db4f046a (patch)
tree9f6f827165f3691496fbf17e39418591e0ac1b2f /kernel/module.c
parentd556e1be33320366272ec02f93f98d7f308479f1 (diff)
downloadlinux-0d9fbf78fefb421a3af97394ce80bba0db4f046a.tar.gz
linux-0d9fbf78fefb421a3af97394ce80bba0db4f046a.tar.bz2
linux-0d9fbf78fefb421a3af97394ce80bba0db4f046a.zip
module: Remove module_disable_ro()
module_disable_ro() has no more users. Remove it. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Joe Lawrence <joe.lawrence@redhat.com> Acked-by: Miroslav Benes <mbenes@suse.cz> Acked-by: Jessica Yu <jeyu@kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/kernel/module.c b/kernel/module.c
index fdd9f6970e9a..3ba024afe379 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1997,19 +1997,6 @@ static void frob_writable_data(const struct module_layout *layout,
(layout->size - layout->ro_after_init_size) >> PAGE_SHIFT);
}
-/* livepatching wants to disable read-only so it can frob module. */
-void module_disable_ro(const struct module *mod)
-{
- if (!rodata_enabled)
- return;
-
- frob_text(&mod->core_layout, set_memory_rw);
- frob_rodata(&mod->core_layout, set_memory_rw);
- frob_ro_after_init(&mod->core_layout, set_memory_rw);
- frob_text(&mod->init_layout, set_memory_rw);
- frob_rodata(&mod->init_layout, set_memory_rw);
-}
-
void module_enable_ro(const struct module *mod, bool after_init)
{
if (!rodata_enabled)