ARM: net: bpf: access eBPF scratch space using ARM FP register
authorRussell King <rmk+kernel@armlinux.org.uk>
Wed, 11 Jul 2018 09:32:02 +0000 (10:32 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 12 Jul 2018 18:45:22 +0000 (20:45 +0200)
commit96cced4e774a2728710c8f8f48441fc7b29d6177
tree9e49b0222dff0fd2f4590813d1960d50146aadab
parenta6eccac507e5e4aed63fb23320fcadeb253c2af6
ARM: net: bpf: access eBPF scratch space using ARM FP register

Access the eBPF scratch space using the frame pointer rather than our
stack pointer, as the offsets from the ARM frame pointer are constant
across all eBPF programs.

Since we no longer reference the scratch space registers from the stack
pointer, this simplifies emit_push_r64() as it no longer needs to know
how many words are pushed onto the stack.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
arch/arm/net/bpf_jit_32.c