Re: bpf-next/net-next: panic using bpf_xdp_adjust_head

2020-05-26 Thread David Ahern
On 5/26/20 7:56 PM, Saeed Mahameed wrote: > On Tue, 2020-05-26 at 18:31 -0600, David Ahern wrote: >> On 5/26/20 3:23 PM, Saeed Mahameed wrote: >>> Anyway I can't figure out the reason for this without extra digging >>> since in mlx5 we do xdp_set_data_meta_invalid(); before passing the >>> xdp >>>

Re: bpf-next/net-next: panic using bpf_xdp_adjust_head

2020-05-26 Thread Saeed Mahameed
On Tue, 2020-05-26 at 18:31 -0600, David Ahern wrote: > On 5/26/20 3:23 PM, Saeed Mahameed wrote: > > Anyway I can't figure out the reason for this without extra digging > > since in mlx5 we do xdp_set_data_meta_invalid(); before passing the > > xdp > > buff to the bpf program, so it is not clear w

Re: bpf-next/net-next: panic using bpf_xdp_adjust_head

2020-05-26 Thread David Ahern
On 5/26/20 3:23 PM, Saeed Mahameed wrote: > Anyway I can't figure out the reason for this without extra digging > since in mlx5 we do xdp_set_data_meta_invalid(); before passing the xdp > buff to the bpf program, so it is not clear why would you hit the > memove in bpf_xdp_adjust_head(). I comment

Re: bpf-next/net-next: panic using bpf_xdp_adjust_head

2020-05-26 Thread David Ahern
On 5/26/20 3:23 PM, Saeed Mahameed wrote: > > looks like: xdp->data_meta has some invalid value. > and i think its boundaries should be checked on > bpf_xdp_adjust_head() regardless of the issue that you are seeing. > > Anyway I can't figure out the reason for this without extra digging > since

Re: bpf-next/net-next: panic using bpf_xdp_adjust_head

2020-05-26 Thread Saeed Mahameed
On Tue, 2020-05-26 at 13:04 -0600, David Ahern wrote: > bpf-next and net-next are panicing when a bpf program uses > adjust_head - > e.g., popping a vlan header. > > [ 7269.886684] BUG: kernel NULL pointer dereference, address: > 0004 > [ 7269.893676] #PF: supervisor read access in ker

bpf-next/net-next: panic using bpf_xdp_adjust_head

2020-05-26 Thread David Ahern
bpf-next and net-next are panicing when a bpf program uses adjust_head - e.g., popping a vlan header. [ 7269.886684] BUG: kernel NULL pointer dereference, address: 0004 [ 7269.893676] #PF: supervisor read access in kernel mode [ 7269.898821] #PF: error_code(0x) - not-present page [