Re: BUG_ON triggered in skb_segment

2018-03-16 Thread Yonghong Song
On 3/16/18 4:03 PM, Eric Dumazet wrote: On 03/16/2018 03:37 PM, Yonghong Song wrote: Eric and Daniel, I have tried to fix this issue but not really successful. I tried two hacks:   . if skb_headlen(list_skb) is not 0, we just pull     skb_headlen(list_skb) from the skb to make

Re: BUG_ON triggered in skb_segment

2018-03-16 Thread Eric Dumazet
On 03/16/2018 03:37 PM, Yonghong Song wrote: > > Eric and Daniel, > > I have tried to fix this issue but not really successful. > I tried two hacks: >   . if skb_headlen(list_skb) is not 0, we just pull >     skb_headlen(list_skb) from the skb to make skb_headlen(list_skb) = 0, or >   . if

Re: BUG_ON triggered in skb_segment

2018-03-16 Thread Yonghong Song
Eric and Daniel, I have tried to fix this issue but not really successful. I tried two hacks: . if skb_headlen(list_skb) is not 0, we just pull skb_headlen(list_skb) from the skb to make skb_headlen(list_skb) = 0, or . if skb_headlen(list_skb) is not 0, we go to the beginning of

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Eric Dumazet
On 03/13/2018 05:35 PM, Eric Dumazet wrote: On 03/13/2018 05:26 PM, Eric Dumazet wrote: On 03/13/2018 05:04 PM, Alexei Starovoitov wrote: On 3/13/18 4:27 PM, Eric Dumazet wrote: On 03/13/2018 04:09 PM, Alexei Starovoitov wrote: we have bpf_skb_proto_6_to_4() that was used by cilium

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Eric Dumazet
On 03/13/2018 05:26 PM, Eric Dumazet wrote: On 03/13/2018 05:04 PM, Alexei Starovoitov wrote: On 3/13/18 4:27 PM, Eric Dumazet wrote: On 03/13/2018 04:09 PM, Alexei Starovoitov wrote: we have bpf_skb_proto_6_to_4() that was used by cilium for long time. It's not clear why it's not

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Eric Dumazet
On 03/13/2018 05:04 PM, Alexei Starovoitov wrote: On 3/13/18 4:27 PM, Eric Dumazet wrote: On 03/13/2018 04:09 PM, Alexei Starovoitov wrote: we have bpf_skb_proto_6_to_4() that was used by cilium for long time. It's not clear why it's not crashing there, but we cannot just reject changing

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Alexei Starovoitov
On 3/13/18 4:27 PM, Eric Dumazet wrote: On 03/13/2018 04:09 PM, Alexei Starovoitov wrote: we have bpf_skb_proto_6_to_4() that was used by cilium for long time. It's not clear why it's not crashing there, but we cannot just reject changing proto in bpf programs now. We have to fix whatever

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Eric Dumazet
On 03/13/2018 04:09 PM, Alexei Starovoitov wrote: we have bpf_skb_proto_6_to_4() that was used by cilium for long time. It's not clear why it's not crashing there, but we cannot just reject changing proto in bpf programs now. We have to fix whatever needs to be fixed in skb_segment (if bug is

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Daniel Borkmann
On 03/14/2018 12:09 AM, Alexei Starovoitov wrote: > On 3/13/18 3:47 PM, Eric Dumazet wrote: >> >> >> On 03/13/2018 03:37 PM, Yonghong Song wrote: >>> Adding additional cc's: >>>    Saeed Mahameed as this is most likely mlx5 driver related. >>>    Diptanu Gon Choudhury who initially reported the

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Alexei Starovoitov
On 3/13/18 3:47 PM, Eric Dumazet wrote: On 03/13/2018 03:37 PM, Yonghong Song wrote: Adding additional cc's: Saeed Mahameed as this is most likely mlx5 driver related. Diptanu Gon Choudhury who initially reported the issue. On 3/13/18 1:44 AM, Steffen Klassert wrote: On Mon, Mar 12,

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Eric Dumazet
On 03/13/2018 03:37 PM, Yonghong Song wrote: Adding additional cc's:   Saeed Mahameed as this is most likely mlx5 driver related.   Diptanu Gon Choudhury who initially reported the issue. On 3/13/18 1:44 AM, Steffen Klassert wrote: On Mon, Mar 12, 2018 at 11:25:09PM -0700, Eric Dumazet

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Yonghong Song
Adding additional cc's: Saeed Mahameed as this is most likely mlx5 driver related. Diptanu Gon Choudhury who initially reported the issue. On 3/13/18 1:44 AM, Steffen Klassert wrote: On Mon, Mar 12, 2018 at 11:25:09PM -0700, Eric Dumazet wrote: On 03/12/2018 11:08 PM, Yonghong Song

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Steffen Klassert
On Mon, Mar 12, 2018 at 11:25:09PM -0700, Eric Dumazet wrote: > > > On 03/12/2018 11:08 PM, Yonghong Song wrote: > > > > > > On 3/12/18 11:04 PM, Eric Dumazet wrote: > > > > > > > > > On 03/12/2018 10:45 PM, Yonghong Song wrote: > > > > ... > > > > Setup: > > > > = > > > > > > > > The

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Eric Dumazet
On 03/12/2018 11:08 PM, Yonghong Song wrote: On 3/12/18 11:04 PM, Eric Dumazet wrote: On 03/12/2018 10:45 PM, Yonghong Song wrote: Hi, One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at net-next function skb_segment, line 3667. 3472 struct sk_buff *skb_segment(struct

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Yunsheng Lin
Hi, Song On 2018/3/13 13:45, Yonghong Song wrote: > Hi, > > One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at > net-next function skb_segment, line 3667. > > 3472 struct sk_buff *skb_segment(struct sk_buff *head_skb, > 3473 netdev_features_t

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Yonghong Song
On 3/12/18 11:04 PM, Eric Dumazet wrote: On 03/12/2018 10:45 PM, Yonghong Song wrote: Hi, One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at net-next function skb_segment, line 3667. 3472 struct sk_buff *skb_segment(struct sk_buff *head_skb, 3473  

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Eric Dumazet
On 03/12/2018 10:45 PM, Yonghong Song wrote: Hi, One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at net-next function skb_segment, line 3667. 3472 struct sk_buff *skb_segment(struct sk_buff *head_skb, 3473 netdev_features_t features) 3474 { 3475