]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
s390/bpf: fix recache skb->data/hlen for skb_vlan_push/pop
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>
Wed, 11 May 2016 19:13:13 +0000 (21:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Jun 2016 17:18:19 +0000 (10:18 -0700)
commitebf529182a6da5fcbecf0305b19de4e0cba048fb
tree90019b3ab10e3f7f98b6333e31418d75adf789f3
parente1c35534e3684e25053f5caf6e032956894e8b1f
s390/bpf: fix recache skb->data/hlen for skb_vlan_push/pop

commit 6edf0aa4f8bbdfbb4d6d786892fa02728d05dc36 upstream.

In case of usage of skb_vlan_push/pop, in the prologue we store
the SKB pointer on the stack and restore it after BPF_JMP_CALL
to skb_vlan_push/pop.

Unfortunately currently there are two bugs in the code:

 1) The wrong stack slot (offset 170 instead of 176) is used
 2) The wrong register (W1 instead of B1) is saved

So fix this and use correct stack slot and register.

Fixes: 9db7f2b81880 ("s390/bpf: recache skb->data/hlen for skb_vlan_push/pop")
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/net/bpf_jit.h
arch/s390/net/bpf_jit_comp.c