From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752094AbcAFFov (ORCPT ); Wed, 6 Jan 2016 00:44:51 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:33870 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751088AbcAFFor (ORCPT ); Wed, 6 Jan 2016 00:44:47 -0500 Date: Wed, 06 Jan 2016 00:44:42 -0500 (EST) Message-Id: <20160106.004442.109655096478479740.davem@davemloft.net> To: rabin@rab.in Cc: 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 Subject: Re: [PATCH] net: filter: make JITs zero A for SKF_AD_ALU_XOR_X From: David Miller In-Reply-To: <1452007387-626-1-git-send-email-rabin@rab.in> References: <1452007387-626-1-git-send-email-rabin@rab.in> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 05 Jan 2016 21:44:47 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rabin Vincent Date: Tue, 5 Jan 2016 16:23:07 +0100 > 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. 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 Applied and queued up for -stable, thanks!