diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-04-29 10:24:48 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2020-05-08 00:12:43 +0200 |
commit | be2422612a580e33b927d0cde7a5a3c7935b2849 (patch) | |
tree | dd82c3643cd41b9e01e60b4139b644d45dc963b8 /arch/um/kernel | |
parent | cb2cceaefb4c4dc28fc27ff1f1b2d258bfc10353 (diff) |
s390/module: Use s390_kernel_write() for late relocations
Because of late module patching, a livepatch module needs to be able to
apply some of its relocations well after it has been loaded. Instead of
playing games with module_{dis,en}able_ro(), use existing text poking
mechanisms to apply relocations after module loading.
So far only x86, s390 and Power have HAVE_LIVEPATCH but only the first
two also have STRICT_MODULE_RWX.
This will allow removal of the last module_disable_ro() usage in
livepatch. The ultimate goal is to completely disallow making
executable mappings writable.
[ jpoimboe: Split up patches. Use mod state to determine whether
memcpy() can be used. Test and add fixes. ]
Cc: linux-s390@vger.kernel.org
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
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: Gerald Schaefer <gerald.schaefer@de.ibm.com> # s390
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'arch/um/kernel')
0 files changed, 0 insertions, 0 deletions