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:   Mon, 26 Jun 2017 10:45:24 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Thierry Reding <thierry.reding@...il.com>
cc:     Mariusz Skamra <mariuszx.skamra@...el.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] ktime: Simplify ktime_compare implementation

On Mon, 26 Jun 2017, Thierry Reding wrote:
> On Fri, May 26, 2017 at 03:00:47PM +0200, Mariusz Skamra wrote:
> > ktime_sub can be used here instread of two conditional checks.
> 
> Boot is broken on Tegra186 on next-20170623. Bisection points at this
> commit and I've confirmed that reverting it also fixes the problem.
> 
> Another fix is to change the return value of ktime_compare() to ktime_t,
> though I'm not sure that'd be a good alternative because it breaks with
> the traditional return type of int (-1, 0, +1) for comparison functions.
> 
> It looks like the issue is with the truncation from s64 to int, as
> demonstrated by this minimal test case:

You are right. And I should have seen it when merging that patch. Looking
deeper, the patch is pointless, because the compiler will optimize the
checks away and use the proper CMP instruction to figure it out.

It's reverted now.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ