[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Moving frags and SKBTX_DEV_ZEROCOPY skbs



On Wed, 2014-05-14 at 20:41 +0100, Zoltan Kiss wrote:
> On 14/05/14 15:23, Eric Dumazet wrote:
> > On Wed, 2014-05-14 at 14:40 +0100, Zoltan Kiss wrote:
> >> Hi,
> >>
> >> Recently I've investigated issues around SKBTX_DEV_ZEROCOPY skbs where
> >> the frags list were modified. I came across this function skb_shift(),
> >> which moves frags between skbs. And there are a lot more of such kind,
> >> skb_split or skb_try_coalesce, for example.
> >> It could be a dangerous thing if a frag is referenced from an skb which
> >> doesn't have the original destructor_arg, and to avoid that
> >> skb_orphan_frags should be called. Although probably these functions are
> >> not normally touched in usual usecases, I think it would be useful to
> >> review core skb functions proactively and add an skb_orphan_frags
> >> everywhere where the frags could be referenced from other places.
> >> Any opinion about this?
> >
> >
> > For skb_shift(), it is currently used from tcp stack only, where
> > this SKBTX_DEV_ZEROCOPY thing is not used, so I do not think there is a
> > bug for the moment.
> It is called from tcp_input.c, which suggests it can be called on 
> incoming TCP packets.

Nope. 

We split outgoing packets, stored in the socket write queue.
These packets are locally generated by tcp_sendmsg() and tcp_sendpage(),
no way we use SKBTX_DEV_ZEROCOPY yet.

This split happens when we receive an ACK, that's why it is in
tcp_input.c




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.