Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df8665c3 authored by Lorenz Bauer's avatar Lorenz Bauer Committed by Greg Kroah-Hartman
Browse files

bpf: Define bpf_jit_alloc_exec_limit for arm64 JIT



[ Upstream commit 5d63ae908242f028bd10860cba98450d11c079b8 ]

Expose the maximum amount of useable memory from the arm64 JIT.

Signed-off-by: default avatarLorenz Bauer <lmb@cloudflare.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211014142554.53120-3-lmb@cloudflare.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8dd688ba
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -996,6 +996,11 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
	return prog;
}

u64 bpf_jit_alloc_exec_limit(void)
{
	return BPF_JIT_REGION_SIZE;
}

void *bpf_jit_alloc_exec(unsigned long size)
{
	return __vmalloc_node_range(size, PAGE_SIZE, BPF_JIT_REGION_START,