On Thu, 2015-09-24 at 05:05 -0700, Eric Dumazet wrote:
> 
> Right, netif_skb_features() only has the following checks :
> 
> if (gso_segs > dev->gso_max_segs || gso_segs < dev->gso_min_segs)
>     features &= ~NETIF_F_GSO_MASK;
> 
> But now we have .ndo_features_check() we could remove this generic 
> check from fast path.

Perhaps so, yes.

Any thoughts on the other reason I was staring at this same code path
this week? I am able to reliably feed inappropriate packets to a
NETIF_F_IP_CSUM-capable device with the test program at
http://bombadil.infradead.org/~dwmw2/raw.c (and equivalent code paths
via virtio_net, tun and others).

They're *supposed* to get checksummed by software if the device can't
cope, but netif_skb_features() returns the wrong answer, so we fail to
do that and they're fed with CHECKSUM_PARTIAL to a device which can't
handle them. Causing a WARN() or a BUG() or a silent corruption,
depending on the driver.

-- 
dwmw2

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to