From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rabin Vincent Subject: Re: [PATCH] arm64: net: bpf: don't BUG() on large shifts Date: Wed, 6 Jan 2016 21:31:27 +0100 Message-ID: <20160106203127.GA16059@debian> References: <1452015543-6790-1-git-send-email-rabin@rab.in> <20160105175557.GC83548@ast-mbp.thefacebook.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: davem@davemloft.net, netdev@vger.kernel.org, zlim.lnx@gmail.com, yang.shi@linaro.org, will.deacon@arm.com, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org To: Alexei Starovoitov Return-path: Received: from mail-wm0-f44.google.com ([74.125.82.44]:38256 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751761AbcAFUbd (ORCPT ); Wed, 6 Jan 2016 15:31:33 -0500 Received: by mail-wm0-f44.google.com with SMTP id b14so92728182wmb.1 for ; Wed, 06 Jan 2016 12:31:33 -0800 (PST) Content-Disposition: inline In-Reply-To: <20160105175557.GC83548@ast-mbp.thefacebook.com> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Jan 05, 2016 at 09:55:58AM -0800, Alexei Starovoitov wrote: > this one is better to be addressed in verifier instead of eBPF JITs. > Please reject it in check_alu_op() instead. AFAICS the eBPF verifier is not called on the eBPF filters generated by the BPF->eBPF conversion in net/core/filter.c, so performing this check only in check_alu_op() will be insufficient. So I think we'd need to add this check to bpf_check_classic() too. Or am I missing something?