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, 17 Sep 2015 20:12:23 -0700
From:	John Stultz <john.stultz@...aro.org>
To:	Michal Nazarewicz <mina86@...a86.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Steven Rostedt (Red Hat)" <rostedt@...dmis.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH] kernel.h: make abs() work with 64-bit types

On Wed, Sep 16, 2015 at 5:57 AM, Michal Nazarewicz <mina86@...a86.com> wrote:
> For 64-bit arguments, abs macro casts it to an int which leads to lost
> precision and may cause incorrect results.  To deal with 64-bit types
> abs64 macro has been introduced but still there are places where abs
> macro is used incorrectly.
>
> To deal with the problem, expand abs macro such that it operates on s64
> type when dealing with 64-bit types while still returning long when
> dealing with smaller types.
>
> Signed-off-by: Michal Nazarewicz <mina86@...a86.com>

Sorry this is a little late, but I did run this patch through my tests
on a 32bit system (against 4.2, since my localized fix has already
landed in Linus' head) to make sure it resolved the bug I saw and it
did.

So,
Tested-by: John Stultz <john.stultz@...aro.org>

thanks!
-john
--
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