]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 15 Jun 2019 01:02:25 +0000 (18:02 -0700)
commit7fb28e567d0efbeb27645c1b8d1bbfcb8b03a071
tree5278d30db2ccb8b0b61d787ab9c867482b1de0a7
parentbfad702a69da8c155225e78e627b1a1b79bc57a0
bpf, x64: fix stack layout of JITed bpf code

Since commit 8b53a2f5163f 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: 8b53a2f5163f ("bpf: change x86 JITed program stack layout")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/x86/net/bpf_jit_comp.c