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]
Date:	Tue, 30 Jul 2013 00:01:03 +1000
From:	Kevin Easton <kevin@...rana.org>
To:	paulmck@...ux.vnet.ibm.com
Cc:	linux-kernel@...r.kernel.org, john.stultz@...aro.org,
	davem@...emloft.net, arnd@...db.de, mingo@...nel.org,
	torvalds@...ux-foundation.org
Subject: Re: [PATCH jiffies] Avoid undefined behavior from signed overflow

Quoting "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>:

> On Mon, Jul 29, 2013 at 03:30:35PM +1000, caf@...rana.org wrote:
>> Quoting "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>:
>>
...
>> >
>> >Note that the C standard considers the cast from signed to
>> >unsigned to be implementation-defined, see 6.3.1.3p3.
...
>>
>> Don't worry, the case from signed to unsigned is actually well-defined -
>> the relevant part is 6.3.1.3p2 (in C99):
>>
>> >Otherwise, if the new type is unsigned, the value is converted by
>> >repeatedly adding or subtracting one more than the maximum value that
>> >can be represented in the new type until the value is in the range of
>> >the new type.
>
> Yep, but we are going in the other direction, from unsigned to signed.

Ahh, there's an error in the commit message (it says signed to unsigned).

     - Kevin

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ