All of lore.kernel.org
 help / color / mirror / Atom feed
* Moving frags and SKBTX_DEV_ZEROCOPY skbs
@ 2014-05-14 13:40 Zoltan Kiss
  2014-05-14 14:23 ` Eric Dumazet
  2014-05-14 14:23 ` Eric Dumazet
  0 siblings, 2 replies; 14+ messages in thread
From: Zoltan Kiss @ 2014-05-14 13:40 UTC (permalink / raw)
  To: netdev; +Cc: xen-devel@lists.xenproject.org, kvm, Eric Dumazet, David Miller

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?

Regards,

Zoltan

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Moving frags and SKBTX_DEV_ZEROCOPY skbs
@ 2014-05-14 13:40 Zoltan Kiss
  0 siblings, 0 replies; 14+ messages in thread
From: Zoltan Kiss @ 2014-05-14 13:40 UTC (permalink / raw)
  To: netdev; +Cc: xen-devel@lists.xenproject.org, Eric Dumazet, kvm, David Miller

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?

Regards,

Zoltan

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-05-15 17:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-14 13:40 Moving frags and SKBTX_DEV_ZEROCOPY skbs Zoltan Kiss
2014-05-14 14:23 ` Eric Dumazet
2014-05-14 14:23 ` Eric Dumazet
2014-05-14 17:42   ` David Miller
2014-05-14 17:52     ` Eric Dumazet
2014-05-14 17:52     ` Eric Dumazet
2014-05-14 17:42   ` David Miller
2014-05-14 19:41   ` Zoltan Kiss
2014-05-14 19:52     ` Eric Dumazet
2014-05-14 19:52     ` Eric Dumazet
2014-05-15 17:14     ` Zoltan Kiss
2014-05-15 17:14     ` Zoltan Kiss
2014-05-14 19:41   ` Zoltan Kiss
  -- strict thread matches above, loose matches on Subject: below --
2014-05-14 13:40 Zoltan Kiss

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.