RE: [PATCH] arm64: net: bpf: don't BUG() on large shifts

2016-01-07 Thread David Laight
From: Alexei Starovoitov > Sent: 06 January 2016 22:13 > On Wed, Jan 06, 2016 at 09:31:27PM +0100, Rabin Vincent wrote: > > 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

Re: [PATCH] arm64: net: bpf: don't BUG() on large shifts

2016-01-06 Thread Alexei Starovoitov
On Wed, Jan 06, 2016 at 09:31:27PM +0100, Rabin Vincent wrote: > 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

Re: [PATCH] arm64: net: bpf: don't BUG() on large shifts

2016-01-06 Thread Rabin Vincent
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

Re: [PATCH] arm64: net: bpf: don't BUG() on large shifts

2016-01-05 Thread Alexei Starovoitov
On Tue, Jan 05, 2016 at 06:39:03PM +0100, Rabin Vincent wrote: > Attempting to generate UBFM/SBFM instructions with shifts that can't be > encoded in the immediate fields of the opcodes leads to a trigger of a > BUG() in the instruction generation code. As the ARMv8 ARM says: "The > shift amounts