From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rYt6M6MCJzDqCp for ; Wed, 22 Jun 2016 02:12:27 +1000 (AEST) Subject: Re: [PATCH] ppc: Fix BPF JIT for ABIv2 To: Thadeu Lima de Souza Cascardo , Michael Ellerman 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> CC: "Naveen N. Rao" , , , , Matt Evans , Daniel Borkmann , Denis Kirjanov , "Paul Mackerras" , "David S. Miller" , "Ananth N Mavinakayanahalli" From: Alexei Starovoitov Message-ID: <57696137.5020408@fb.com> Date: Tue, 21 Jun 2016 08:45:59 -0700 MIME-Version: 1.0 In-Reply-To: <20160621144725.GH3516@indiana.gru.redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.