]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8b53a2f5163fb6314ed5549b41a69327ce586bcd
treed8cb564978e0f74b91e0a297e98976c2b3af79ba
parent5d98d54a6aaeb7ecb2b137887197c62927817ae6
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