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  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:	Wed, 2 Oct 2013 13:08:20 +0100
From:	"David Laight" <David.Laight@...LAB.COM>
To:	"Eric Dumazet" <>,
	"David Miller" <>
Cc:	"netdev" <>
Subject: RE: [PATCH net-next] tcp: shrink tcp6_timewait_sock by one cache line

> -	tmo = tw->tw_ttd - jiffies;
> +	tmo = tw->tw_ttd - (u32)jiffies;

Do you need any of these (u32) casts?
The compiler will almost certainly use 32bit arithmetic (on 32bit systems at least)
because the 'as if' rule lets if use the smaller type.

> +		tw->tw_ttd = (u32)(jiffies + (slot << INET_TWDR_RECYCLE_TICK));

If that (u32) cast is needed in order to avoid 64bit maths, it is in the wrong place.


Powered by blists - more mailing lists