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:	Wed, 14 Jan 2015 22:52:23 +0800
From:	Xunlei Pang <pang.xunlei@...aro.org>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	Xunlei Pang <xlpang@....com>, lkml <linux-kernel@...r.kernel.org>,
	John Stultz <john.stultz@...aro.org>,
	Arnd Bergmann <arnd.bergmann@...aro.org>,
	"rtc-linux@...glegroups.com" <rtc-linux@...glegroups.com>,
	Alessandro Zummo <a.zummo@...ertech.it>
Subject: Re: [RFC PATCH v2 2/9] time: Provide y2106 safe get_seconds() replacement

On 14 January 2015 at 04:42, Thomas Gleixner <tglx@...utronix.de> wrote:
> On Tue, 13 Jan 2015, Xunlei Pang wrote:
>
>> From: Xunlei Pang <pang.xunlei@...aro.org>
>>
>> As part of addressing "y2038 problem" for in-kernel uses, this
>> patch adds safe get_seconds64() using time64_t.
>>
>> After this patch, get_seconds() is deprecated and all its call sites
>> will be fixed using get_seconds64(), after that it can be removed.
>
> Why another interface?
>
> We already have ktime_get_real_seconds(). That handles 32bit
> correctly, while your new function does not.
>
> You cannot return a 64bit value unprotected against updates on 32bit,
> unless you want to implement a RNG.

Yes, ktime_get_real_seconds() should be used instead.

Thanks,
Xunlei
--
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