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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1387499933.19078.379.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Thu, 19 Dec 2013 16:38:53 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Nithin Nayak Sujir <nsujir@...adcom.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org,
	stable@...r.kernel.org, Michael Chan <mchan@...adcom.com>
Subject: Re: [PATCH net] tg3: Expand 4g_overflow_test workaround to skb
 fragments of any size.

On Thu, 2013-12-19 at 16:24 -0800, Nithin Nayak Sujir wrote:
> The current driver assumes that an skb fragment can only be upto jumbo
> size. Presumably this was a fast-path optimization. This assumption is
> no longer true as fragments can be upto 32k.
> 
> Cc: stable@...r.kernel.org
> Signed-off-by: Nithin Nayak Sujir <nsujir@...adcom.com>
> Signed-off-by: Michael Chan <mchan@...adcom.com>
> ---
>  drivers/net/ethernet/broadcom/tg3.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> index f3dd93b..8ab21d7 100644
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -7622,7 +7622,7 @@ static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len)
>  {
>  	u32 base = (u32) mapping & 0xffffffff;
>  
> -	return (base > 0xffffdcc0) && (base + len + 8 < base);
> +	return (base + len + 8 < base);
>  }

And it is actually faster ;)

What is 8 value exactly ?



--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ