ARM: net: bpf: fix register saving
authorRussell King <rmk+kernel@armlinux.org.uk>
Sat, 13 Jan 2018 22:38:18 +0000 (22:38 +0000)
committerRussell King <rmk+kernel@armlinux.org.uk>
Wed, 17 Jan 2018 19:38:07 +0000 (19:38 +0000)
commit02088d9b392f605c892894b46aa8c83e3abd0115
tree7dd2b1eb8b47f46e6d621a81a745d4158a002182
parent0005e55a79cfda88199e41a406a829c88d708c67
ARM: net: bpf: fix register saving

When an eBPF program tail-calls another eBPF program, it enters it after
the prologue to avoid having complex stack manipulations.  This can lead
to kernel oopses, and similar.

Resolve this by always using a fixed stack layout, a CPU register frame
pointer, and using this when reloading registers before returning.

Fixes: 39c13c204bb1 ("arm: eBPF JIT compiler")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/net/bpf_jit_32.c