From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757593AbbKFRAW (ORCPT ); Fri, 6 Nov 2015 12:00:22 -0500 Received: from foss.arm.com ([217.140.101.70]:43082 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755789AbbKFRAU (ORCPT ); Fri, 6 Nov 2015 12:00:20 -0500 Date: Fri, 6 Nov 2015 17:00:16 +0000 From: Catalin Marinas To: Zi Shen Lim Cc: Alexei Starovoitov , Yang Shi , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Xi Wang , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] arm64: bpf: fix mod-by-zero case Message-ID: <20151106170015.GB7637@e104818-lin.cambridge.arm.com> References: <1446698639-12362-1-git-send-email-zlim.lnx@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446698639-12362-1-git-send-email-zlim.lnx@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Reported-by: Yang Shi > Reported-by: Xi Wang > CC: Alexei Starovoitov > CC: Catalin Marinas > Fixes: e54bcde3d69d ("arm64: eBPF JIT compiler") > Cc: # 3.18+ > --- > This patch applies on top of "arm64: bpf: fix fiv-by-zero case" [2]. Both patches applied. Thanks. -- Catalin