From: Jisheng Zhang Date: Mon, 29 Mar 2021 18:25:51 +0000 (+0800) Subject: riscv: module: Create module allocations without exec permissions X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5387054b986e2d0d994b519020d81b8aa64789c5;p=linux.git 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 Signed-off-by: Palmer Dabbelt --- diff --git a/arch/riscv/kernel/module.c b/arch/riscv/kernel/module.c index ce153771e5e9b..68a9e3d1fe16a 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