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] [day] [month] [year] [list]
Date:	Fri, 21 Dec 2007 07:18:13 -0500
From:	Jeff Garzik <jeff@...zik.org>
To:	David Miller <davem@...emloft.net>
CC:	yoshfuji@...ux-ipv6.org, dada1@...mosbay.com,
	netdev@...r.kernel.org
Subject: Re: [TCP] IPV6 : Change a divide into a right shift in tcp_v6_send_ack()

David Miller wrote:
> From: Jeff Garzik <jeff@...zik.org>
> Date: Fri, 21 Dec 2007 06:26:48 -0500
> 
>> YOSHIFUJI Hideaki / 吉藤英明 wrote:
>>> In article <476B574E.80601@...mosbay.com> (at Fri, 21 Dec 2007 07:03:58 +0100), Eric Dumazet <dada1@...mosbay.com> says:
>>>
>>>> Because tot_len is signed in tcp_v6_send_ack(), tot_len/4 forces compiler
>>>> to emit an integer divide, while we can help it to use a right shift,
>>>> less expensive.
>>> Are you really sure?
>>> At least, gcc-4.1.2-20061115 (debian) does not make any difference.
>> Quite true -- thus it is a matter of taste to the programmer.
> 
> Not true, the code output does change, check your optimize-for-size
> kernel config setting.
> 
> This was discussed and explained later in this thread, and I also
> explained it to you on IRC Jeff ;-)

[looks]

For signed integers, this is true.

For unsigned integers, the code output is the same, regardless of 
optimization setting.

	Jeff


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