]> www.infradead.org Git - users/jedix/linux-maple.git/commit
s390/bpf: clear correct BPF accumulator register
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>
Thu, 23 Jul 2015 17:26:15 +0000 (19:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Aug 2015 19:21:52 +0000 (12:21 -0700)
commit19d959286d62e07ce0e46c6c65ace822a6dc52e0
treef5ab5c322a3f713993816cb2f7186877c15b45e6
parent36566f6df428262b8ab122e062d72c1a81ad4576
s390/bpf: clear correct BPF accumulator register

commit 30342fe65e511007672437741158d493472f427f upstream.

Currently we assumed the following BPF to eBPF register mapping:

 - BPF_REG_A -> BPF_REG_7
 - BPF_REG_X -> BPF_REG_8

Unfortunately this mapping is wrong. The correct mapping is:

 - BPF_REG_A -> BPF_REG_0
 - BPF_REG_X -> BPF_REG_7

So clear the correct registers and use the BPF_REG_A and BPF_REG_X
macros instead of BPF_REG_0/7.

Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend")
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_comp.c