projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4225fea
)
bpf: Define bpf_jit_alloc_exec_limit for riscv JIT
author
Lorenz Bauer
<lmb@cloudflare.com>
Thu, 14 Oct 2021 14:25:51 +0000
(15:25 +0100)
committer
Alexei Starovoitov
<ast@kernel.org>
Sat, 23 Oct 2021 00:23:53 +0000
(17:23 -0700)
Expose the maximum amount of useable memory from the riscv JIT.
Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Luke Nelson <luke.r.nels@gmail.com>
Acked-by: Björn Töpel <bjorn@kernel.org>
Link:
https://lore.kernel.org/bpf/20211014142554.53120-2-lmb@cloudflare.com
arch/riscv/net/bpf_jit_core.c
patch
|
blob
|
history
diff --git
a/arch/riscv/net/bpf_jit_core.c
b/arch/riscv/net/bpf_jit_core.c
index fed86f42dfbe56813a99bf737ec5b75f1c42380f..0fee2cbaaf533a2111c5a79d971e331bf4cfd1af 100644
(file)
--- a/
arch/riscv/net/bpf_jit_core.c
+++ b/
arch/riscv/net/bpf_jit_core.c
@@
-166,6
+166,11
@@
out:
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,