s390/bpf: fix bpf frame pointer setup
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>
Tue, 2 Jun 2015 05:48:35 +0000 (22:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Jun 2015 02:31:39 +0000 (19:31 -0700)
commit88aeca15d637c279171ba441730ef41e4c4ce0ed
tree3d052ee68f61b0ecc24acc130a674594b5175609
parentbbac1c94880cb8c7e093718897f4822f3933dd3c
s390/bpf: fix bpf frame pointer setup

Currently the bpf frame pointer is set to the old r15. This is
wrong because of packed stack. Fix this and adjust the frame pointer
to respect packed stack. This now generates a prolog like the following:

 3ff8001c3faeb67f0480024   stmg    %r6,%r7,72(%r15)
 3ff8001c400ebcff0780024   stmg    %r12,%r15,120(%r15)
 3ff8001c406b904001f       lgr     %r1,%r15      <- load backchain
 3ff8001c40a41d0f048       la      %r13,72(%r15) <- load adjusted bfp
 3ff8001c40ea7fbfd98       aghi    %r15,-616
 3ff8001c412e310f0980024   stg     %r1,152(%r15) <- save backchain

Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend")
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/s390/net/bpf_jit_comp.c