Re: [PATCH v2 net-next] bpf: enable verifier to add 0 to packet ptr

2017-02-03 Thread William Tu
Thanks. I got it. I will resubmit v3 patch! On Fri, Feb 3, 2017 at 2:53 PM, Alexei Starovoitov wrote: > On Fri, Feb 03, 2017 at 11:29:19PM +0100, Daniel Borkmann wrote: >> On 02/03/2017 10:10 PM, William Tu wrote: >> >Hi Alexei, >> > >> >why it is bogus? on my system, it fails without the patch a

Re: [PATCH v2 net-next] bpf: enable verifier to add 0 to packet ptr

2017-02-03 Thread Alexei Starovoitov
On Fri, Feb 03, 2017 at 11:29:19PM +0100, Daniel Borkmann wrote: > On 02/03/2017 10:10 PM, William Tu wrote: > >Hi Alexei, > > > >why it is bogus? on my system, it fails without the patch applied. > > > >--William > > > >On Fri, Feb 3, 2017 at 12:55 PM, Alexei Starovoitov > > wrote: > >>On Fri, Feb

Re: [PATCH v2 net-next] bpf: enable verifier to add 0 to packet ptr

2017-02-03 Thread Daniel Borkmann
On 02/03/2017 10:10 PM, William Tu wrote: Hi Alexei, why it is bogus? on my system, it fails without the patch applied. --William On Fri, Feb 3, 2017 at 12:55 PM, Alexei Starovoitov wrote: On Fri, Feb 03, 2017 at 09:22:45AM -0800, William Tu wrote: The patch fixes the case when adding a zer

Re: [PATCH v2 net-next] bpf: enable verifier to add 0 to packet ptr

2017-02-03 Thread William Tu
Hi Alexei, why it is bogus? on my system, it fails without the patch applied. --William On Fri, Feb 3, 2017 at 12:55 PM, Alexei Starovoitov wrote: > On Fri, Feb 03, 2017 at 09:22:45AM -0800, William Tu wrote: >> The patch fixes the case when adding a zero value to the packet >> pointer. The ve

Re: [PATCH v2 net-next] bpf: enable verifier to add 0 to packet ptr

2017-02-03 Thread Alexei Starovoitov
On Fri, Feb 03, 2017 at 09:22:45AM -0800, William Tu wrote: > The patch fixes the case when adding a zero value to the packet > pointer. The verifer reports the following error: > [...] > R0=imm0,min_value=0,max_value=0 > R1=pkt(id=0,off=0,r=4) > R2=pkt_end R3=fp-12 > R4=imm4,min

Re: [PATCH v2 net-next] bpf: enable verifier to add 0 to packet ptr

2017-02-03 Thread Daniel Borkmann
[ please keep us Cc'ed ;) ] On 02/03/2017 06:22 PM, William Tu wrote: The patch fixes the case when adding a zero value to the packet pointer. The verifer reports the following error: [...] R0=imm0,min_value=0,max_value=0 R1=pkt(id=0,off=0,r=4) R2=pkt_end R3=fp-12 R4=imm4

[PATCH v2 net-next] bpf: enable verifier to add 0 to packet ptr

2017-02-03 Thread William Tu
The patch fixes the case when adding a zero value to the packet pointer. The verifer reports the following error: [...] R0=imm0,min_value=0,max_value=0 R1=pkt(id=0,off=0,r=4) R2=pkt_end R3=fp-12 R4=imm4,min_value=4,max_value=4 R5=pkt(id=0,off=4,r=4) 269: (bf) r2 = r0 //