netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: johannes@sipsolutions.net
Cc: netdev@vger.kernel.org, herbert@gondor.apana.org.au
Subject: Re: [RFC/T] [NET] make pskb_expand_head warn when called with invalid state
Date: Mon, 12 May 2008 22:15:13 -0700 (PDT)	[thread overview]
Message-ID: <20080512.221513.178144312.davem@davemloft.net> (raw)
In-Reply-To: <1210003274.8245.35.camel@johannes.berg>

From: Johannes Berg <johannes@sipsolutions.net>
Date: Mon, 05 May 2008 18:01:14 +0200

> On Mon, 2008-05-05 at 17:41 +0200, Johannes Berg wrote:
> > [23194.608077] [ccf9bba0] [c02735a0] pskb_expand_head+0x58/0x1f8 (unreliable)
> > [23194.608082] [ccf9bbc0] [c02737a4] __pskb_pull_tail+0x64/0x374
> 
> It's actually not really a false positive. What is happening is that
> __pskb_pull_tail does (follow 'eat'):
 ...
> which of course changes the true size of the skb without accounting it
> to the socket. Now, the reason this hasn't been known before is that the
> data size doesn't change because the stuff that is copied into the
> header is removed from the data_len... or something like that, I think.

FWIW, the only practical case where this can occur is for an SG+CSUM
device which cannot handle DMA'ing highmem pages, and we get such a
page via sendfile() or similar.

All other cases are extremely rare, such as the route changing
mid-connection from a device that can, to a device which cannot do
SG+CSUM.

I think we need to do some more fixups and auditing before we can
enable this pskb_expand_head() assertion, and the same goes for
your more-accurate skb_truesize_check().

  reply	other threads:[~2008-05-13  5:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-04 18:16 [RFC/T] [NET] make pskb_expand_head warn when called with invalid state Johannes Berg
2008-05-05 15:40 ` Johannes Berg
2008-05-05 16:01   ` Johannes Berg
2008-05-13  5:15     ` David Miller [this message]
2008-05-13  8:32       ` Johannes Berg
2008-05-13  8:38         ` David Miller
2008-05-13  5:11   ` 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=20080512.221513.178144312.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=johannes@sipsolutions.net \
    --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).