diff options
author | Ard Biesheuvel <ard.biesheuvel@arm.com> | 2019-05-23 12:22:56 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2019-06-24 19:10:39 +0200 |
commit | 3f750706486227f32991092fe57c25e1290691d5 (patch) | |
tree | 5a72f5b162d30df760052975423bd62dd8e04d2f /arch/arm64/net | |
parent | arm64/kprobes: set VM_FLUSH_RESET_PERMS on kprobe instruction pages (diff) | |
download | linux-3f750706486227f32991092fe57c25e1290691d5.tar.xz linux-3f750706486227f32991092fe57c25e1290691d5.zip |
arm64: bpf: do not allocate executable memory
The BPF code now takes care of mapping the code pages executable
after mapping them read-only, to ensure that no RWX mapped regions
are needed, even transiently. This means we can drop the executable
permissions from the mapping at allocation time.
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/net')
-rw-r--r-- | arch/arm64/net/bpf_jit_comp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c index df845cee438e..aef4ff467222 100644 --- a/arch/arm64/net/bpf_jit_comp.c +++ b/arch/arm64/net/bpf_jit_comp.c @@ -981,7 +981,7 @@ void *bpf_jit_alloc_exec(unsigned long size) { return __vmalloc_node_range(size, PAGE_SIZE, BPF_JIT_REGION_START, BPF_JIT_REGION_END, GFP_KERNEL, - PAGE_KERNEL_EXEC, 0, NUMA_NO_NODE, + PAGE_KERNEL, 0, NUMA_NO_NODE, __builtin_return_address(0)); } |