diff --git a/Documentation/bpf/bpf_design_QA.rst b/Documentation/bpf/bpf_design_QA.rst index be5fc4ac00d6..98d70b8a2533 100644 --- a/Documentation/bpf/bpf_design_QA.rst +++ b/Documentation/bpf/bpf_design_QA.rst @@ -223,11 +223,12 @@ Q: How much stack space a BPF program uses? ------------------------------------------- A: A program may use up to 2 KiB of stack, combined over its call chain, when the JIT of the architecture reports support for large -stacks (currently x86-64); a single function may use all of it, and -every frame of a program running on a private stack gets the whole -amount. Elsewhere, and whenever the interpreter is used, the limit is -512 bytes. The verifier computes the actual amount of stack used and -both interpreter and most JITed code consume necessary amount. +stacks (currently x86-64 and arm64); a single function may use all of +it, and every frame of a program running on a private stack gets the +whole amount. Elsewhere, and for programs verified for the interpreter, +the limit is 512 bytes; the interpreter itself never runs a frame +larger than that. The verifier computes the actual amount of stack +used and both interpreter and most JITed code consume necessary amount. Q: Can BPF be offloaded to HW? ------------------------------ diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c index 44e3a9e683e8..475e70653454 100644 --- a/arch/arm64/net/bpf_jit_comp.c +++ b/arch/arm64/net/bpf_jit_comp.c @@ -2503,6 +2503,11 @@ bool bpf_jit_supports_callx(void) return true; } +bool bpf_jit_supports_large_stack(void) +{ + return true; +} + static void invoke_bpf_prog(struct jit_ctx *ctx, struct bpf_tramp_node *node, int bargs_off, int retval_off, int run_ctx_off, bool save_ret)