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, 21 Apr 2016 04:35:49 -0700
From:	Tina Ruchandani <ruchandani.tina@...il.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	y2038 <y2038@...ts.linaro.org>, dri-devel@...ts.freedesktop.org,
	Linux Kernel List <linux-kernel@...r.kernel.org>,
	Wentao Xu <wentaox@...eaurora.org>,
	Thierry Reding <treding@...dia.com>,
	Hai Li <hali@...eaurora.org>
Subject: Re: [PATCH v2] drm/msm: Use 64-bit timekeeping

>
> How about
>
>         remaining_jiffies = msecs_to_jiffies(ktime_ms_delta(*timeout, now));
>
> which only does one 64-bit division, and it's one that we can probably
> optimize out in the future (we can check in ktime_ms_delta whether the
> difference is more than 2^32 nanoseconds as the fast path).

Hi Arnd,
I had thought about that, but discard that approach being confused
about the truncation.
ktime_ms_delta returns s64 and msecs_to_jiffies will truncate that
input to int. However,
I now realize that for the msecs value to be greater than 32 bits, the
time delta has to be
>= ((2^29)/(60*60*24*365)) or >= 17 years. So your solution is safe.
If that sounds ok, I will send out a v3.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ