summaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2021-03-30 02:25:51 +0800
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-04-26 08:25:15 -0700
commit5387054b986e2d0d994b519020d81b8aa64789c5 (patch)
tree179c4db72e9edd6d1280c6d2c2fbcac71355dd51 /arch/riscv/kernel
parentfc8504765ec5e812135b8ccafca7101069a0c6d8 (diff)
downloadlinux-5387054b986e2d0d994b519020d81b8aa64789c5.tar.bz2
riscv: module: Create module allocations without exec permissions
The core code manages the executable permissions of code regions of modules explicitly, it is not necessary to create the module vmalloc regions with RWX permissions. Create them with RW- permissions instead. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/kernel')
-rw-r--r--arch/riscv/kernel/module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kernel/module.c b/arch/riscv/kernel/module.c
index ce153771e5e9..68a9e3d1fe16 100644
--- a/arch/riscv/kernel/module.c
+++ b/arch/riscv/kernel/module.c
@@ -412,7 +412,7 @@ void *module_alloc(unsigned long size)
{
return __vmalloc_node_range(size, 1, MODULES_VADDR,
MODULES_END, GFP_KERNEL,
- PAGE_KERNEL_EXEC, 0, NUMA_NO_NODE,
+ PAGE_KERNEL, 0, NUMA_NO_NODE,
__builtin_return_address(0));
}
#endif