From mboxrd@z Thu Jan 1 00:00:00 1970 From: davem@davemloft.net (David Miller) Date: Tue, 12 Jan 2016 15:56:09 -0500 (EST) Subject: [PATCHv2] net: bpf: reject invalid shifts In-Reply-To: <1452626228-15742-1-git-send-email-rabin@rab.in> References: <20160112185121.GA34045@ast-mbp.thefacebook.com> <1452626228-15742-1-git-send-email-rabin@rab.in> Message-ID: <20160112.155609.526505451119578505.davem@davemloft.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org From: Rabin Vincent Date: Tue, 12 Jan 2016 20:17:08 +0100 > On ARM64, a BUG() is triggered in the eBPF JIT if a filter with a > constant shift that can't be encoded in the immediate field of the > UBFM/SBFM instructions is passed to the JIT. Since these shifts > amounts, which are negative or >= regsize, are invalid, reject them in > the eBPF verifier and the classic BPF filter checker, for all > architectures. > > Signed-off-by: Rabin Vincent > --- > v2: handle BPF_ARSH too Applied and queued up for -stable, thanks.