diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2023-04-02 20:55:19 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2023-04-13 17:36:26 +0200 |
commit | 7c7ab788c0959c363b5cb2ac5ff4822fc12ccba5 (patch) | |
tree | 80547a6915f93ff00cf45f0f94f052f2f256528a /arch/s390/kernel/module.c | |
parent | f9b2d96c4fa4475929e26cbac4027801d93c6e53 (diff) |
s390/ftrace: do not assume module_alloc() returns executable memory
The ftrace code assumes at two places that module_alloc() returns
executable memory. While this is currently true, this will be changed
with a subsequent patch to follow other architectures which implement
ARCH_HAS_STRICT_MODULE_RWX.
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/module.c')
-rw-r--r-- | arch/s390/kernel/module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c index 6588f4efe378..57c13e30e66d 100644 --- a/arch/s390/kernel/module.c +++ b/arch/s390/kernel/module.c @@ -509,7 +509,7 @@ static int module_alloc_ftrace_hotpatch_trampolines(struct module *me, start = module_alloc(numpages * PAGE_SIZE); if (!start) return -ENOMEM; - set_memory_ro((unsigned long)start, numpages); + set_memory_rox((unsigned long)start, numpages); end = start + size; me->arch.trampolines_start = (struct ftrace_hotpatch_trampoline *)start; |