lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 2 Sep 2010 11:02:12 +0000
From:	Jarek Poplawski <jarkao2@...il.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	David Miller <davem@...emloft.net>, shemminger@...tta.com,
	herbert@...dor.apana.org.au, netdev@...r.kernel.org
Subject: Re: [PATCH] sky2: don't do GRO on second port

On Thu, Sep 02, 2010 at 12:41:45PM +0200, Eric Dumazet wrote:
> Le jeudi 02 septembre 2010 ?? 09:55 +0000, Jarek Poplawski a écrit :
> 
> > 
> > Exactly, but there is no "a single napi --> device mapping". And sky2
> > uses the same model. So, there is only a question of cost of this test,
> > and a question of probability of gro errors on collisions without such
> > a test in normal use. (And if gro can never do such errors for other
> > reasons?)
> 
> Two vlans might carry packets in different domains, with a clash of IP
> space and TCP flows. Even with a probability of 0.000000001%, we cannot
> ever merge two packets of different domains. Really !

Hmm... But there is only a question of sky2 and this test in
__napi_gro_receive().

> 
> napi->dev is not used in GRO path, as mentioned earlier,
> but in napi_get_frags(), while not needed.
> 
> To make this very clear, I suggest following patch :

But where this skb gets its skb->dev now?

Jarek P.

> 
> [PATCH net-next-2.6] gro: remove use of napi->dev
> 
> Only use of napi->dev in GRO stack is the one found in napi_get_frags()
> 
> We can remove it and use a plain dev_alloc_skb() call.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
> ---
>  net/core/dev.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index d8c43e7..607057a 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -3248,9 +3248,11 @@ struct sk_buff *napi_get_frags(struct napi_struct *napi)
>  	struct sk_buff *skb = napi->skb;
>  
>  	if (!skb) {
> -		skb = netdev_alloc_skb_ip_align(napi->dev, GRO_MAX_HEAD);
> -		if (skb)
> +		skb = dev_alloc_skb(GRO_MAX_HEAD + NET_IP_ALIGN);
> +		if (skb) {
> +			skb_reserve(skb, NET_IP_ALIGN);
>  			napi->skb = skb;
> +		}
>  	}
>  	return skb;
>  }
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists