summaryrefslogtreecommitdiffstats
path: root/arch/arm64/mm/ptdump.c
diff options
context:
space:
mode:
authorRussell King <russell.king@oracle.com>2021-11-05 17:50:45 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2021-11-08 22:16:26 +0100
commitb89ddf4cca43f1269093942cf5c4e457fd45c335 (patch)
treed8f7c34876d83786477b7ae84adbc8b1d0b3eaa3 /arch/arm64/mm/ptdump.c
parentMerge branch 'introduce bpf_find_vma' (diff)
downloadlinux-b89ddf4cca43f1269093942cf5c4e457fd45c335.tar.xz
linux-b89ddf4cca43f1269093942cf5c4e457fd45c335.zip
arm64/bpf: Remove 128MB limit for BPF JIT programs
Commit 91fc957c9b1d ("arm64/bpf: don't allocate BPF JIT programs in module memory") restricts BPF JIT program allocation to a 128MB region to ensure BPF programs are still in branching range of each other. However this restriction should not apply to the aarch64 JIT, since BPF_JMP | BPF_CALL are implemented as a 64-bit move into a register and then a BLR instruction - which has the effect of being able to call anything without proximity limitation. The practical reason to relax this restriction on JIT memory is that 128MB of JIT memory can be quickly exhausted, especially where PAGE_SIZE is 64KB - one page is needed per program. In cases where seccomp filters are applied to multiple VMs on VM launch - such filters are classic BPF but converted to BPF - this can severely limit the number of VMs that can be launched. In a world where we support BPF JIT always on, turning off the JIT isn't always an option either. Fixes: 91fc957c9b1d ("arm64/bpf: don't allocate BPF JIT programs in module memory") Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Russell King <russell.king@oracle.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Tested-by: Alan Maguire <alan.maguire@oracle.com> Link: https://lore.kernel.org/bpf/1636131046-5982-2-git-send-email-alan.maguire@oracle.com
Diffstat (limited to 'arch/arm64/mm/ptdump.c')
-rw-r--r--arch/arm64/mm/ptdump.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/arm64/mm/ptdump.c b/arch/arm64/mm/ptdump.c
index 1c403536c9bb..9bc4066c5bf3 100644
--- a/arch/arm64/mm/ptdump.c
+++ b/arch/arm64/mm/ptdump.c
@@ -41,8 +41,6 @@ static struct addr_marker address_markers[] = {
{ 0 /* KASAN_SHADOW_START */, "Kasan shadow start" },
{ KASAN_SHADOW_END, "Kasan shadow end" },
#endif
- { BPF_JIT_REGION_START, "BPF start" },
- { BPF_JIT_REGION_END, "BPF end" },
{ MODULES_VADDR, "Modules start" },
{ MODULES_END, "Modules end" },
{ VMALLOC_START, "vmalloc() area" },