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, 4 Sep 2013 13:33:03 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	John Stultz <john.stultz@...aro.org>
Cc:	Arun Sharma <asharma@...com>, LKML <linux-kernel@...r.kernel.org>,
	Kumar Sundararajan <kumar@...com>
Subject: Re: clock_gettime_ns

On Wed, Sep 4, 2013 at 12:20 PM, John Stultz <john.stultz@...aro.org> wrote:
> On Wed, Sep 4, 2013 at 11:51 AM, Andy Lutomirski <luto@...capital.net> wrote:
>> I think that most of the hangup was a lack of agreement on how the API
>> should work wrt leap seconds.
>
> I don't recall this objection. The interface uses existing clockids,
> so it probably should keep the existing leap-second behavior of those
> clockids.
>
>> I've always thought that the Right Way to represent a UTC time is
>> nanoseconds since some epoch, where every potential leap second
>> counts.
>
> Check out the CLOCK_TAI clockid merged in 3.10.
>

I never really liked that -- CLOCK_TAI doesn't tell what time it is in
any format that normal people understand.

I'd advocate for going whole hog and returning, atomically:

 - TAI (nanoseconds from epoch)
 - UTC - TAI (seconds or nanoseconds) *
 - TAI - CLOCK_MONOTONIC (nanoseconds)
 - a leap second flag.

* There are various ways to define this.  My fancy UTC - TAI wouldn't
actually need the leap-second flag, since the UTC time would indicate
leap seconds directly.  With the conventional approach, someone would
have to decide whether the leap second count increments at the
beginning or the end of the leap second.

--Andy
--
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