From: Rusty Russell <rusty@rustcorp.com.au>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: net: Ensure partial checksum offset is inside the skb head
Date: Fri, 5 Jun 2009 13:52:01 +0930 [thread overview]
Message-ID: <200906051352.02133.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20090604112201.GA28820@gondor.apana.org.au>
On Thu, 4 Jun 2009 08:52:01 pm Herbert Xu wrote:
> On Thu, Jun 04, 2009 at 09:06:00PM +1000, Herbert Xu wrote:
> > tun: Optimise handling of bogus gso->hdr_len
> >
> > As all current versions of virtio_net generate a value for the
> > header length that's too small, we should optimise this so that
> > we don't copy it twice. This can be done by ensuring that it is
> > at least as large as the place where we'll write the checksum.
> >
> > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> With this applied we can strengthen the partial checksum check:
>
> net: Ensure partial checksum offset is inside the skb head
>
> In skb_partial_csum_set we check to see if the checksum offset
> is within the packet. However, we really should check that it
> is within the skb head as that's the only bit we can modify
> without copying.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Yep, makes sense. FWIW:
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Thanks!
Rusty.
next prev parent reply other threads:[~2009-06-05 4:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-04 11:06 tun: Optimise handling of bogus gso->hdr_len Herbert Xu
2009-06-04 11:22 ` net: Ensure partial checksum offset is inside the skb head Herbert Xu
2009-06-05 4:22 ` Rusty Russell [this message]
2009-06-08 7:23 ` David Miller
2009-06-08 7:22 ` tun: Optimise handling of bogus gso->hdr_len David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200906051352.02133.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).