Re: [PATCH bpf] bpf, arm64: fix stack_depth tracking in combination with tail calls

2018-01-16 Thread Alexei Starovoitov
On Tue, Jan 16, 2018 at 03:46:08AM +0100, Daniel Borkmann wrote: > 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 epilo

[PATCH bpf] bpf, arm64: fix stack_depth tracking in combination with tail calls

2018-01-15 Thread Daniel Borkmann
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 m