alistair23-linux/arch/arm64/net
Daniel Borkmann a2284d912b bpf, arm64: fix stack_depth tracking in combination with tail calls
Using dynamic stack_depth tracking in arm64 JIT is currently broken in
combination with tail calls. In prologue, we cache ctx->stack_size and
adjust SP reg for setting up function call stack, and tearing it down
again in epilogue. Problem is that when doing a tail call, the cached
ctx->stack_size might not be the same.

One way to fix the problem with minimal overhead is to re-adjust SP in
emit_bpf_tail_call() and properly adjust it to the current program's
ctx->stack_size. Tested on Cavium ThunderX ARMv8.

Fixes: f1c9eed7f4 ("bpf, arm64: take advantage of stack_depth tracking")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-01-16 11:29:15 -08:00
..
bpf_jit.h bpf, arm64: implement jiting of BPF_J{LT, LE, SLT, SLE} 2017-08-09 16:53:56 -07:00
bpf_jit_comp.c bpf, arm64: fix stack_depth tracking in combination with tail calls 2018-01-16 11:29:15 -08:00
Makefile arm64: eBPF JIT compiler 2014-09-08 14:39:21 +01:00