Thread (12 messages) 12 messages, 5 authors, 2013-01-29

Re: [PATCH net-next] net: fix possible wrong checksum generation

From: Pravin Shelar <hidden>
Date: 2013-01-29 19:30:11

On Mon, Jan 28, 2013 at 10:35 AM, Ben Hutchings
[off-list ref] wrote:
On Fri, 2013-01-25 at 22:34 -0800, Eric Dumazet wrote:
quoted
From: Eric Dumazet <edumazet@google.com>

Pravin Shelar mentioned that GSO could potentially generate
wrong TX checksum if skb has fragments that are overwritten
by the user between the checksum computation and transmit.

He suggested to linearize skbs but this extra copy can be
avoided for normal tcp skbs cooked by tcp_sendmsg().

This patch introduces a new SKB_GSO_SHARED_FRAG flag, set
in skb_shinfo(skb)->gso_type if at least one frag can be
modified by the user.
[...]

Again, this needs a net device feature, doesn't it?  net_gso_ok() should
allow hardware checksum/segmentation offload of such packets, and it
won't if there is this new GSO flag with no corresponding net device
feature.
I am not sure if this flag need to be a GSO type. There is possibility
of having such a page fragment in non GSO packets.
we could have this flag in skb_shinfo(skb)->tx_flags.

Thanks,
Pravin.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help