settimeofday breakage

Karel Zak kzak@redhat.com
Tue Feb 18 10:34:00 GMT 2020


On Tue, Feb 11, 2020 at 03:43:48PM -0500, J William Piggott wrote:
> On Tue, 11 Feb 2020, Adhemerval Zanella wrote:
> > This lead to a more in-depth discussion if the offset handling should
> > be handled in kernel and/or if should be deprecated as well [2].  Linus
> > has agreed that:
> > 
> > "We should not do TZ on a kernel level at all. At least not a global
> > one. It makes no sense.

Well, I guess we all agree that global TZ is nothing nice and in an
ideal world all computers keep primary time resource(s) in in UTC, ...
but MS-DOS era has introduced locatime RTC and this legacy is still with
us and we probably need (?) to somehow deal with dual boots.

> > So, it seems that current API is far from perfect and won't be supported
> > on newer architectures.  I am not sure which is current kernel stand on
> > such matter, and systemd has also an open defect to track it [3].
> > 
> > From glibc standpoint, we agreed that this offset setting interface is
> > clunky is very specific, so  handle multiple architectures and have a
> > concise semantic we decided to deprecate its usage.

I don't think we need any extra support from glibc. 

>From my point of view it does not make sense to maintain in libc extra API 
for only systemd and hwclock to set TZ. It would be enough to have some RTC 
specific ioctl(s) to deal with this very specific task.

I think it was already suggested by Lennart at:
 https://github.com/systemd/systemd/issues/13305

Frankly, this is so specific that I don't care about API elegance...

> From a hwclock(8) maintenance prospective the question to be answered
> is: is the Linux kernel going to stop supporting a localtime RTC?

Right. This is the point.

We (userspace) will follow kernel decision, what else ;-) So, all is
in LKML hands.

> Your summary makes it sound so. If yes, we simply strip that
> functionality out of hwclock(8) and when the complaints come in we just
> tell them Linux abandoned localtime RTC and send them to Linus.

Maybe we're just too soft and careful and year 2020 is the right time to say 
No to localtime RTC :-)

(Lennart added to CC)

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com



More information about the Libc-alpha mailing list