* [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be called for redirected xsk copy mode
@ 2020-07-02 9:17 Li, Rongqing
2020-07-06 6:13 ` Magnus Karlsson
0 siblings, 1 reply; 5+ messages in thread
From: Li, Rongqing @ 2020-07-02 9:17 UTC (permalink / raw)
To: intel-wired-lan
Hi:
i40e_rx_buffer_flip to xsk copy mode can lead to data corruption, like the following flow:
1. first skb is not for xsk, and forwarded to another device or socket queue
2. seconds skb is for xsk, copy data to xsk memory, and page of skb->data is released
3. rx_buff is reusable since only first skb is in it, but i40e_rx_buffer_flip will make that page_offset is set to first skb data
4. then reuse rx buffer, first skb which still is living will be corrupted.
-Li RongQing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20200702/810347e7/attachment.html>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be called for redirected xsk copy mode
2020-07-02 9:17 [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be called for redirected xsk copy mode Li, Rongqing
@ 2020-07-06 6:13 ` Magnus Karlsson
2020-07-14 11:05 ` [Intel-wired-lan] 答复: " Li, Rongqing
0 siblings, 1 reply; 5+ messages in thread
From: Magnus Karlsson @ 2020-07-06 6:13 UTC (permalink / raw)
To: intel-wired-lan
Thank you RongQing for reporting this. I will take a look at it and
produce a patch.
/Magnus
On Thu, Jul 2, 2020 at 11:33 AM Li,Rongqing <lirongqing@baidu.com> wrote:
>
> Hi:
>
>
>
> i40e_rx_buffer_flip to xsk copy mode can lead to data corruption, like the following flow:
>
>
>
> 1. first skb is not for xsk, and forwarded to another device or socket queue
>
> 2. seconds skb is for xsk, copy data to xsk memory, and page of skb->data is released
>
> 3. rx_buff is reusable since only first skb is in it, but i40e_rx_buffer_flip will make that page_offset is set to first skb data
>
> 4. then reuse rx buffer, first skb which still is living will be corrupted.
>
>
>
> -Li RongQing
>
>
>
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan at osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] 答复: [bug ?] i40e_rx_buffer_flip should not be called for redirected xsk copy mode
2020-07-06 6:13 ` Magnus Karlsson
@ 2020-07-14 11:05 ` Li, Rongqing
2020-07-16 4:39 ` [Intel-wired-lan] " Magnus Karlsson
0 siblings, 1 reply; 5+ messages in thread
From: Li, Rongqing @ 2020-07-14 11:05 UTC (permalink / raw)
To: intel-wired-lan
> -----????-----
> ???: Li,Rongqing
> ????: 2020?7?6? 14:38
> ???: 'Magnus Karlsson' <magnus.karlsson@gmail.com>
> ??: intel-wired-lan <intel-wired-lan@lists.osuosl.org>; Bj?rn T?pel
> <bjorn.topel@intel.com>; Karlsson, Magnus <magnus.karlsson@intel.com>;
> Netdev <netdev@vger.kernel.org>
> ??: ??: [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be called
> for redirected xsk copy mode
>
>
>
> > -----????-----
> > ???: Magnus Karlsson [mailto:magnus.karlsson at gmail.com]
> > ????: 2020?7?6? 14:13
> > ???: Li,Rongqing <lirongqing@baidu.com>
> > ??: intel-wired-lan <intel-wired-lan@lists.osuosl.org>; Bj?rn T?pel
> > <bjorn.topel@intel.com>; Karlsson, Magnus <magnus.karlsson@intel.com>;
> > Netdev <netdev@vger.kernel.org>
> > ??: Re: [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be
> > called for redirected xsk copy mode
> >
> > Thank you RongQing for reporting this. I will take a look at it and
> > produce a patch.
> >
> > /Magnus
>
Ping
-Li
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be called for redirected xsk copy mode
2020-07-14 11:05 ` [Intel-wired-lan] 答复: " Li, Rongqing
@ 2020-07-16 4:39 ` Magnus Karlsson
2020-07-16 5:33 ` [Intel-wired-lan] 答复: " Li, Rongqing
0 siblings, 1 reply; 5+ messages in thread
From: Magnus Karlsson @ 2020-07-16 4:39 UTC (permalink / raw)
To: intel-wired-lan
On Tue, Jul 14, 2020 at 1:05 PM Li,Rongqing <lirongqing@baidu.com> wrote:
>
>
>
> > -----????-----
> > ???: Li,Rongqing
> > ????: 2020?7?6? 14:38
> > ???: 'Magnus Karlsson' <magnus.karlsson@gmail.com>
> > ??: intel-wired-lan <intel-wired-lan@lists.osuosl.org>; Bj?rn T?pel
> > <bjorn.topel@intel.com>; Karlsson, Magnus <magnus.karlsson@intel.com>;
> > Netdev <netdev@vger.kernel.org>
> > ??: ??: [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be called
> > for redirected xsk copy mode
> >
> >
> >
> > > -----????-----
> > > ???: Magnus Karlsson [mailto:magnus.karlsson at gmail.com]
> > > ????: 2020?7?6? 14:13
> > > ???: Li,Rongqing <lirongqing@baidu.com>
> > > ??: intel-wired-lan <intel-wired-lan@lists.osuosl.org>; Bj?rn T?pel
> > > <bjorn.topel@intel.com>; Karlsson, Magnus <magnus.karlsson@intel.com>;
> > > Netdev <netdev@vger.kernel.org>
> > > ??: Re: [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be
> > > called for redirected xsk copy mode
> > >
> > > Thank you RongQing for reporting this. I will take a look at it and
> > > produce a patch.
> > >
> > > /Magnus
> >
>
> Ping
My apologies RongQing, but it is taking longer than expected due to
key people being on vacation during this summer period. We are
debating weather the simple fix you provided covers all cases.
Hopefully it does, but we just want to make sure. The fix is needed in
four drivers: the ones you mention plus ice.
/Magnus
>
> -Li
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] 答复: [bug ?] i40e_rx_buffer_flip should not be called for redirected xsk copy mode
2020-07-16 4:39 ` [Intel-wired-lan] " Magnus Karlsson
@ 2020-07-16 5:33 ` Li, Rongqing
0 siblings, 0 replies; 5+ messages in thread
From: Li, Rongqing @ 2020-07-16 5:33 UTC (permalink / raw)
To: intel-wired-lan
> > > >
> > > > Thank you RongQing for reporting this. I will take a look at it
> > > > and produce a patch.
> > > >
> > > > /Magnus
> > >
> >
> > Ping
>
> My apologies RongQing, but it is taking longer than expected due to key people
> being on vacation during this summer period. We are debating weather the
> simple fix you provided covers all cases.
> Hopefully it does, but we just want to make sure. The fix is needed in four
> drivers: the ones you mention plus ice.
>
> /Magnus
If my RFC patch is suitable for this bug, I will resend it.
should I send four patches for four drivers, or should I send one patch for them?
Thanks
-Li
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-07-16 5:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-02 9:17 [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be called for redirected xsk copy mode Li, Rongqing
2020-07-06 6:13 ` Magnus Karlsson
2020-07-14 11:05 ` [Intel-wired-lan] 答复: " Li, Rongqing
2020-07-16 4:39 ` [Intel-wired-lan] " Magnus Karlsson
2020-07-16 5:33 ` [Intel-wired-lan] 答复: " Li, Rongqing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox