Re: [PATCH net V2] virtio-net: drop NETIF_F_FRAGLIST

2015-08-07 Thread David Miller
From: Jason Wang Date: Wed, 5 Aug 2015 10:34:04 +0800 > virtio declares support for NETIF_F_FRAGLIST, but assumes > that there are at most MAX_SKB_FRAGS + 2 fragments which isn't > always true with a fraglist. > > A longer fraglist in the skb will make the call to skb_to_sgvec overflow > the sg

Re: [PATCH net V2] virtio-net: drop NETIF_F_FRAGLIST

2015-08-06 Thread David Miller
From: "Michael S. Tsirkin" Date: Thu, 6 Aug 2015 16:13:11 +0300 > On Wed, Aug 05, 2015 at 10:34:04AM +0800, Jason Wang wrote: >> virtio declares support for NETIF_F_FRAGLIST, but assumes >> that there are at most MAX_SKB_FRAGS + 2 fragments which isn't >> always true with a fraglist. >> >> A lon

Re: [PATCH net V2] virtio-net: drop NETIF_F_FRAGLIST

2015-08-06 Thread Michael S. Tsirkin
On Wed, Aug 05, 2015 at 10:34:04AM +0800, Jason Wang wrote: > virtio declares support for NETIF_F_FRAGLIST, but assumes > that there are at most MAX_SKB_FRAGS + 2 fragments which isn't > always true with a fraglist. > > A longer fraglist in the skb will make the call to skb_to_sgvec overflow > the

Re: [PATCH net V2] virtio-net: drop NETIF_F_FRAGLIST

2015-08-04 Thread Michael S. Tsirkin
On Wed, Aug 05, 2015 at 10:34:04AM +0800, Jason Wang wrote: > virtio declares support for NETIF_F_FRAGLIST, but assumes > that there are at most MAX_SKB_FRAGS + 2 fragments which isn't > always true with a fraglist. > > A longer fraglist in the skb will make the call to skb_to_sgvec overflow > the

[PATCH net V2] virtio-net: drop NETIF_F_FRAGLIST

2015-08-04 Thread Jason Wang
virtio declares support for NETIF_F_FRAGLIST, but assumes that there are at most MAX_SKB_FRAGS + 2 fragments which isn't always true with a fraglist. A longer fraglist in the skb will make the call to skb_to_sgvec overflow the sg array, leading to memory corruption. Drop NETIF_F_FRAGLIST so we on