diff options
| author | Daniel Borkmann <[email protected]> | 2018-01-16 03:46:08 +0100 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2018-01-16 11:29:15 -0800 |
| commit | a2284d912bfc865cdca4c00488e08a3550f9a405 (patch) | |
| tree | 03aea207e0887441cad8e42550fc6fbf3475ae8c /include/linux/fpga/fpga-bridge.h | |
| parent | 68fda450a7df51cff9e5a4d4a4d9d0d5f2589153 (diff) | |
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: f1c9eed7f437 ("bpf, arm64: take advantage of stack_depth tracking")
Signed-off-by: Daniel Borkmann <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'include/linux/fpga/fpga-bridge.h')
0 files changed, 0 insertions, 0 deletions