All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: David Miller <davem@davemloft.net>
Cc: eric.dumazet@gmail.com, johannes@sipsolutions.net,
	sedat.dilek@gmail.com, sfr@canb.auug.org.au,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, hannes@stressinduktion.org,
	linux-wireless@vger.kernel.org, linville@tuxdriver.com
Subject: Re: linux-next: Tree for Aug 7
Date: Wed, 7 Aug 2013 20:37:58 +0200	[thread overview]
Message-ID: <20130807183758.GB16263@orbit.nwl.cc> (raw)
In-Reply-To: <20130807.104713.1615549684239408926.davem@davemloft.net>

On Wed, Aug 07, 2013 at 10:47:13AM -0700, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Wed, 07 Aug 2013 09:40:09 -0700
> 
> > On Wed, 2013-08-07 at 18:22 +0200, Johannes Berg wrote:
> > 
> >> Maybe. I haven't tested it, but I'm thinking that skb->data doesn't
> >> point to the start of the data frame in this case, since we now call
> >> eth_type_trans() which pulls the ethernet header. So if the device just
> >> transmits skb->len starting from skb->data, it'll be wrong, no? That
> >> seems a basic assumption though.
> > 
> > Yes, it seems calling eth_type_trans() is not right here, and even could
> > crash.
> > 
> > Sorry, for being vague, I am a bit busy this morning.
> 
> Yes, this is absolutely the core problem, you absolute cannot
> call eth_type_trans() on the output path, it pulls off the
> ethernet header from the packet.  That can't possibly work.
> 
> I want a real fix submitted formally for this problem immediately,
> or else I'm reverting all of these changes this afternoon.

One could simply call skb_push(skb, ETH_HLEN) right after calling
eth_type_trans(skb, dev) in order to undo the 'data' and 'len'
adjustment. Not sure if this kind of hack is the right way to go here,
or if the whole af_packet parses ethernet header discussion should be
opened again instead.

Best wishes, Phil

  reply	other threads:[~2013-08-07 18:38 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07  5:54 linux-next: Tree for Aug 7 Stephen Rothwell
2013-08-07  5:54 ` Stephen Rothwell
2013-08-07  8:29 ` Sedat Dilek
2013-08-07 15:59   ` Phil Sutter
2013-08-07 16:12     ` Johannes Berg
2013-08-07 16:17       ` Eric Dumazet
2013-08-07 16:22         ` Johannes Berg
2013-08-07 16:40           ` Eric Dumazet
2013-08-07 17:47             ` David Miller
2013-08-07 18:37               ` Phil Sutter [this message]
2013-08-07 23:27                 ` David Miller
2013-08-07 23:36                   ` David Miller
2013-08-08  0:02                     ` Sedat Dilek
2013-08-08  0:09                       ` David Miller
2013-08-08  0:13                         ` David Miller
2013-08-08  0:06                     ` Eric Dumazet
2013-08-09 13:58                     ` Phil Sutter
  -- strict thread matches above, loose matches on Subject: below --
2025-08-07  5:30 Stephen Rothwell
2024-08-07  4:57 Stephen Rothwell
2023-08-07  5:47 Stephen Rothwell
2020-08-07  6:41 Stephen Rothwell
2019-08-07  8:36 Stephen Rothwell
2019-08-08  5:13 ` Michael Ellerman
2019-08-08 15:54   ` Gustavo A. R. Silva
2018-08-07 11:37 Stephen Rothwell
2017-08-07  6:44 Stephen Rothwell
2015-08-07  8:50 Stephen Rothwell
2014-08-07  7:40 Stephen Rothwell
2012-08-07  4:30 Stephen Rothwell

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=20130807183758.GB16263@orbit.nwl.cc \
    --to=phil@nwl.cc \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=hannes@stressinduktion.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=sedat.dilek@gmail.com \
    --cc=sfr@canb.auug.org.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.