From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751255AbcFVEGu (ORCPT ); Wed, 22 Jun 2016 00:06:50 -0400 Received: from ozlabs.org ([103.22.144.67]:50995 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751155AbcFVEGs (ORCPT ); Wed, 22 Jun 2016 00:06:48 -0400 Message-ID: <1466568405.19785.1.camel@ellerman.id.au> Subject: Re: [PATCH] ppc: Fix BPF JIT for ABIv2 From: Michael Ellerman To: Alexei Starovoitov , Thadeu Lima de Souza Cascardo Cc: "Naveen N. Rao" , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org, Matt Evans , Daniel Borkmann , Denis Kirjanov , Paul Mackerras , "David S. Miller" , Ananth N Mavinakayanahalli Date: Wed, 22 Jun 2016 14:06:45 +1000 In-Reply-To: <57696137.5020408@fb.com> References: <908d3552b5eb240b28f70aee7c4c86e2b600aa02.1465304785.git.naveen.n.rao@linux.vnet.ibm.com> <3rWKtT2tSrz9t2G@ozlabs.org> <20160617130042.GO3516@indiana.gru.redhat.com> <20160619174914.GC8886@naverao1-tp.localdomain> <20160620185620.GD3516@indiana.gru.redhat.com> <20160621085807.GE8886@naverao1-tp.localdomain> <1466507748.18876.3.camel@ellerman.id.au> <20160621144725.GH3516@indiana.gru.redhat.com> <57696137.5020408@fb.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5-1ubuntu3.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2016-06-21 at 08:45 -0700, Alexei Starovoitov wrote: > On 6/21/16 7:47 AM, Thadeu Lima de Souza Cascardo wrote: > > > > > > > > The calling convention is different with ABIv2 and so we'll need changes > > > > in bpf_slow_path_common() and sk_negative_common(). > > > > > > How big would those changes be? Do we know? > > > > > > How come no one reported this was broken previously? This is the first I've > > > heard of it being broken. > > > > > > > I just heard of it less than two weeks ago, and only could investigate it last > > week, when I realized mainline was also affected. > > > > It looks like the little-endian support for classic JIT were done before the > > conversion to ABIv2. And as JIT is disabled by default, no one seems to have > > exercised it. > > it's not a surprise unfortunately. The JITs that were written before > test_bpf.ko was developed were missing corner cases. Typical tcpdump > would be fine, but fragmented packets, negative offsets and > out-out-bounds wouldn't be handled correctly. > I'd suggest to validate the stable backport with test_bpf as well. OK thanks. I have been running seltests/net/test_bpf, but I realise now it doesn't enable the JIT. cheers