bpf, x64: fix stack layout of JITed bpf code
authorAlexei Starovoitov <ast@kernel.org>
Fri, 14 Jun 2019 22:43:28 +0000 (15:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 Jul 2019 06:11:12 +0000 (08:11 +0200)
commit292ba5b1faf4eb44e2f72c8d1651040bc98a1949
tree5a1e302775da81df96e765c63da13a36306caf3c
parent4c2ce7addda888c17db7625a07e79b24fdce6211
bpf, x64: fix stack layout of JITed bpf code

[ Upstream commit fe8d9571dc50232b569242fac7ea6332a654f186 ]

Since commit 177366bf7ceb the %rbp stopped pointing to %rbp of the
previous stack frame. That broke frame pointer based stack unwinding.
This commit is a partial revert of it.
Note that the location of tail_call_cnt is fixed, since the verifier
enforces MAX_BPF_STACK stack size for programs with tail calls.

Fixes: 177366bf7ceb ("bpf: change x86 JITed program stack layout")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/net/bpf_jit_comp.c