bpf: change x86 JITed program stack layout
authorAlexei Starovoitov <ast@fb.com>
Tue, 30 May 2017 20:31:34 +0000 (13:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 May 2017 23:29:48 +0000 (19:29 -0400)
commit177366bf7ceb35860281a6ebe824e42bf96fd95d
treed8cb564978e0f74b91e0a297e98976c2b3af79ba
parentb870aa901f4be1d32c13faf9e8f40bf2a8562e19
bpf: change x86 JITed program stack layout

in order to JIT programs with different stack sizes we need to
make epilogue and exception path to be stack size independent,
hence move auxiliary stack space from the bottom of the stack
to the top of the stack.
Nice side effect is that JITed function prologue becomes shorter
due to imm8 offset encoding vs imm32.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/x86/net/bpf_jit.S
arch/x86/net/bpf_jit_comp.c