netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zoltan Kiss <zoltan.kiss@linaro.org>
To: David Vrabel <david.vrabel@citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>
Cc: netdev@vger.kernel.org,
	Malcolm Crossley <malcolm.crossley@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] [PATCHv1 net-next] xen-netback: remove unconditional pull_skb_tail in guest Tx path
Date: Mon, 03 Nov 2014 18:23:03 +0000	[thread overview]
Message-ID: <5457C807.5080509@linaro.org> (raw)
In-Reply-To: <5457BF80.2000205@citrix.com>



On 03/11/14 17:46, David Vrabel wrote:
> On 03/11/14 17:39, Ian Campbell wrote:
>> On Mon, 2014-11-03 at 17:23 +0000, David Vrabel wrote:
>>> From: Malcolm Crossley <malcolm.crossley@citrix.com>
>>>
>>> Unconditionally pulling 128 bytes into the linear buffer is not
>>> required. Netback has already grant copied up-to 128 bytes from the
>>> first slot of a packet into the linear buffer. The first slot normally
>>> contain all the IPv4/IPv6 and TCP/UDP headers.
>>
>> What about when it doesn't? It sounds as if we now won't pull up, which
>> would be bad.
>
> The network stack will always pull any headers it needs to inspect (the
> frag may be a userspace page which has the same security issues as a
> frag with a foreign page).
I wouldn't bet my life on this, but indeed it should always happen.

>
> e.g., see skb_checksum_setup() called slightly later on in netback.
Fortunately the call to checksum_setup a bit later makes sure that at 
least the TCP/UDP headers are in the linear area, which is quite the 
same as blindly pulling 128 bytes. With any other protocol we rely on 
the network stack that it will enforce packet header in the linear buffer.

Regards,

Zoli

  parent reply	other threads:[~2014-11-03 18:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03 17:23 [PATCHv1 net-next] xen-netback: remove unconditional pull_skb_tail in guest Tx path David Vrabel
2014-11-03 17:39 ` Ian Campbell
2014-11-03 17:46   ` David Vrabel
2014-11-03 17:55     ` Ian Campbell
2014-11-03 18:23     ` Zoltan Kiss [this message]
2014-11-04 21:17       ` [Xen-devel] " David Miller
2014-11-04 21:43         ` Eric Dumazet
2014-11-05 10:46           ` David Vrabel
2014-11-05 10:53             ` Ian Campbell
2014-11-05  9:51         ` Ian Campbell
2014-11-05 17:15           ` David Miller
2014-11-04 21:41 ` David Miller
2014-11-05  9:53   ` Ian Campbell
2014-11-05 17:16     ` 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=5457C807.5080509@linaro.org \
    --to=zoltan.kiss@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=malcolm.crossley@citrix.com \
    --cc=netdev@vger.kernel.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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).