]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/bpf: Fix BPF_SUB when imm == 0x80000000
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Tue, 5 Oct 2021 20:25:23 +0000 (01:55 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 7 Oct 2021 08:52:26 +0000 (19:52 +1100)
commiteb47f9eb7fd857aa4492ad074470f78e44829526
tree3f5123b46a801ca6e58a4eff17c6520b90a3b756
parenta589d7e2e5170305a28e691d23016096913f43a8
powerpc/bpf: Fix BPF_SUB when imm == 0x80000000

We aren't handling subtraction involving an immediate value of
0x80000000 properly. Fix the same.

Fixes: 0f3624780b048f ("powerpc/ebpf/jit: Implement JIT compiler for extended BPF")
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
[mpe: Fold in fix from Naveen to use imm <= 32768]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/fc4b1276eb10761fd7ce0814c8dd089da2815251.1633464148.git.naveen.n.rao@linux.vnet.ibm.com
arch/powerpc/net/bpf_jit_comp64.c