diff options
author | Zi Shen Lim | 2015-11-05 05:43:59 +0100 |
---|---|---|
committer | Catalin Marinas | 2015-11-06 17:58:48 +0100 |
commit | 14e589ff4aa3f28a5424e92b6495ecb8950080f7 (patch) | |
tree | 7ca405fec1a9c34a6d1e2fd00ceb50cdbc9995b5 /arch/arm64/mm | |
parent | arm64: bpf: fix div-by-zero case (diff) | |
download | kernel-qcow2-linux-14e589ff4aa3f28a5424e92b6495ecb8950080f7.tar.gz kernel-qcow2-linux-14e589ff4aa3f28a5424e92b6495ecb8950080f7.tar.xz kernel-qcow2-linux-14e589ff4aa3f28a5424e92b6495ecb8950080f7.zip |
arm64: bpf: fix mod-by-zero case
Turns out in the case of modulo by zero in a BPF program:
A = A % X; (X == 0)
the expected behavior is to terminate with return value 0.
The bug in JIT is exposed by a new test case [1].
[1] https://lkml.org/lkml/2015/11/4/499
Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com>
Reported-by: Yang Shi <yang.shi@linaro.org>
Reported-by: Xi Wang <xi.wang@gmail.com>
CC: Alexei Starovoitov <ast@plumgrid.com>
Fixes: e54bcde3d69d ("arm64: eBPF JIT compiler")
Cc: <stable@vger.kernel.org> # 3.18+
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/mm')
0 files changed, 0 insertions, 0 deletions