[PATCH] arm64: bpf: fix mod-by-zero case

Catalin Marinas catalin.marinas at arm.com
Fri Nov 6 09:00:16 PST 2015


On Wed, Nov 04, 2015 at 08:43:59PM -0800, Zi Shen Lim wrote:
> 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 at gmail.com>
> Reported-by: Yang Shi <yang.shi at linaro.org>
> Reported-by: Xi Wang <xi.wang at gmail.com>
> CC: Alexei Starovoitov <ast at plumgrid.com>
> CC: Catalin Marinas <catalin.marinas at arm.com>
> Fixes: e54bcde3d69d ("arm64: eBPF JIT compiler")
> Cc: <stable at vger.kernel.org> # 3.18+
> ---
> This patch applies on top of "arm64: bpf: fix fiv-by-zero case" [2].

Both patches applied. Thanks.

-- 
Catalin



More information about the linux-arm-kernel mailing list