From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752715AbcAEQAy (ORCPT ); Tue, 5 Jan 2016 11:00:54 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:33241 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752423AbcAEQAs (ORCPT ); Tue, 5 Jan 2016 11:00:48 -0500 Message-ID: <1452009645.8255.96.camel@edumazet-glaptop2.roam.corp.google.com> Subject: Re: [PATCH] net: filter: make JITs zero A for SKF_AD_ALU_XOR_X From: Eric Dumazet To: Rabin Vincent Cc: davem@davemloft.net, netdev@vger.kernel.org, daniel@iogearbox.net, ast@kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 05 Jan 2016 08:00:45 -0800 In-Reply-To: <1452007387-626-1-git-send-email-rabin@rab.in> References: <1452007387-626-1-git-send-email-rabin@rab.in> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 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-01-05 at 16:23 +0100, Rabin Vincent wrote: > The SKF_AD_ALU_XOR_X ancillary is not like the other ancillary data > instructions since it XORs A with X while all the others replace A with > some loaded value. All the BPF JITs fail to clear A if this is used as > the first instruction in a filter. Is x86_64 part of this 'All' subset ? ;) > This was found using american fuzzy > lop. > > Add a helper to determine if A needs to be cleared given the first > instruction in a filter, and use this in the JITs. Except for ARM, the > rest have only been compile-tested. > > Fixes: 3480593131e0 ("net: filter: get rid of BPF_S_* enum") > Signed-off-by: Rabin Vincent > ---