linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Abdelrhman Ahmed <ab@abahmed.com>
To: "Eric Dumazet" <eric.dumazet@gmail.com>
Cc: "davem" <davem@davemloft.net>, "netdev" <netdev@vger.kernel.org>,
	"linux-kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: Reset skb to network header in neigh_hh_output
Date: Wed, 26 Oct 2016 01:57:25 +0200	[thread overview]
Message-ID: <157fe46f382.10e50a6d8188917.494328765811573491@abahmed.com> (raw)
In-Reply-To: <1475874656.28155.268.camel@edumazet-glaptop3.roam.corp.google.com>

 > What is the issue you want to fix exactly ? 
 > Please describe the use case. 

When netfilter hook uses skb_push to add a specific header between network
header and hardware header.
For the first time(s) before caching hardware header, this header will be
removed / overwritten by hardware header due to resetting to network header.
After using the cached hardware header, this header will be kept as we do not
reset. I think this behavior is inconsistent, so we need to reset in both cases.

 > Otherwise, your fix is in fact adding a critical bug. 

Could you explain more as it's not clear to me?



 ---- On Fri, 07 Oct 2016 23:10:56 +0200 Eric Dumazet <eric.dumazet@gmail.com> wrote ---- 
 > On Fri, 2016-10-07 at 16:14 +0200, Abdelrhman Ahmed wrote: 
 > > When hardware header is added without using cached one, neigh_resolve_output 
 > > and neigh_connected_output reset skb to network header before adding it. 
 > > When cached one is used, neigh_hh_output does not reset the skb to network 
 > > header. 
 > >  
 > > The fix is to reset skb to network header before adding cached hardware header 
 > > to keep the behavior consistent in all cases. 
 >  
 > What is the issue you want to fix exactly ? 
 >  
 > Please describe the use case. 
 >  
 > I highly suggest you take a look at commit 
 >  
 > e1f165032c8bade3a6bdf546f8faf61fda4dd01c 
 > ("net: Fix skb_under_panic oops in neigh_resolve_output") 
 >  
 > Otherwise, your fix is in fact adding a critical bug. 
 >  
 >  
 > 

  reply	other threads:[~2016-10-25 23:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07 14:14 [PATCH] net: Reset skb to network header in neigh_hh_output Abdelrhman Ahmed
2016-10-07 16:27 ` Sergei Shtylyov
2016-10-07 16:38   ` Sergei Shtylyov
2016-10-07 21:10 ` Eric Dumazet
2016-10-25 23:57   ` Abdelrhman Ahmed [this message]
2016-10-26  0:12     ` Eric Dumazet
2016-10-26 16:53       ` Abdelrhman Ahmed
2016-10-26 17:08         ` Eric Dumazet

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=157fe46f382.10e50a6d8188917.494328765811573491@abahmed.com \
    --to=ab@abahmed.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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).