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]
Message-ID: <49662F08.4070607@rubidium.dyndns.org>
Date:	Thu, 08 Jan 2009 17:51:20 +0100
From:	Magnus Danielson <magnus@...idium.dyndns.org>
To:	"M. Warner Losh" <imp@...imp.com>
CC:	davidn@...idnewall.com, david@...g.hm, hancockr@...w.ca,
	kyle@...fetthome.net, slashdot@...eshallam.info,
	goodgerster@...il.com, mayer@....isc.org,
	linux-kernel@...r.kernel.org, ntpwg@...ts.ntp.isc.org,
	pretzalz@...hhouse.org, burdell@...ntheinter.net,
	linasvepstas@...il.com, nick@...k-andrew.net, jeff@...owsky.org,
	magnus@...idium.dyndns.org
Subject: Re: [ntpwg] Bug: Status/Summary of slashdot leap-second crash on
 new years 2008-2009

M. Warner Losh skrev:
> In message: <49647E0F.9030008@...idnewall.com>
>             David Newall <davidn@...idnewall.com> writes:
> : Linas Vepstas wrote:
> : > Currently, the Linux kernel keeps time in UTC. This means
> : > that it must take special actions to tick twice when a leap
> : > second comes by.
> : 
> : Except it doesn't have to tick twice.  Refer to
> : http://lkml.org/lkml/2009/1/7/78 in which I show that a time_t (what
> : time() returns) counts leap seconds (According to Bernstein this is what
> : UTC means), and using zoneinfo, the library processes leap seconds
> : correctly.
> 
> This is *NOT* POSIX time_t.  In order to be posix compliant, you can't
> do what Bernstein suggests.  You can be non-complaint and deal it with
> zoneinfo.

You are free to keep your core time in whatever form you wish, but if 
you want your time_t to be POSIX compatible when accessed over POSIX 
interfaces you would need to honour the POSIX time_t mapping. While 
POSIX tried to avoid the leapsecond issue, the mapping they do perform 
has a peculiar effect on what happends on time_t if you also want to 
honour the UTC to time_t mapping while accepting UTC from external sources.

> : I just realised that the Notes in man 2 time are confusing and probably
> : unnecessary.  Suffice to say that (assuming correctly configured
> : zoneinfo) time() returns the number of seconds elapsed since start 1970.
> 
> That's not POSIX complaint.

It just *appears* to be the number of "seconds" since 1970. This 
appearence is important to some and causing a greif to others.

Cheers,
Magnus
--
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