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

2017-02-06 Thread David Miller
From: William Tu Date: Sat, 4 Feb 2017 08:37:29 -0800 > The patch fixes the case when adding a zero value to the packet > pointer. The zero value could come from src_reg equals type > BPF_K or CONST_IMM. The patch fixes both, otherwise the verifer > reports the following

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

2017-02-04 Thread Alexei Starovoitov
On Sat, Feb 04, 2017 at 08:37:29AM -0800, William Tu wrote: > The patch fixes the case when adding a zero value to the packet > pointer. The zero value could come from src_reg equals type > BPF_K or CONST_IMM. The patch fixes both, otherwise the verifer > reports the following error: > [...] >

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

2017-02-04 Thread William Tu
The patch fixes the case when adding a zero value to the packet pointer. The zero value could come from src_reg equals type BPF_K or CONST_IMM. The patch fixes both, otherwise the verifer reports the following error: [...] R0=imm0,min_value=0,max_value=0 R1=pkt(id=0,off=0,r=4)