s390/bpf: Fix 64-bit subtraction of the -0x80000000 constant
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 7 Sep 2021 11:41:16 +0000 (13:41 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 16 Sep 2021 08:39:55 +0000 (10:39 +0200)
commit6e61dc9da0b7a0d91d57c2e20b5ea4fd2d4e7e53
tree2b051b7314963b0b9aa5a1af02490712b2f41c3a
parent1511df6f5e9ef32826f20db2ee81f8527154dc14
s390/bpf: Fix 64-bit subtraction of the -0x80000000 constant

The JIT uses agfi for subtracting constants, but -(-0x80000000) cannot
be represented as a 32-bit signed binary integer. Fix by using algfi in
this particular case.

Reported-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend")
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/net/bpf_jit_comp.c