All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
	rtc-linux@googlegroups.com,
	Alessandro Zummo <a.zummo@towertech.it>, Willy Tarreau <w@1wt.eu>,
	linux-kernel@vger.kernel.org
Subject: [rtc-linux] Re: [PATCH] rtc: Add an option to invalidate dates in 2038
Date: Mon, 22 Feb 2016 17:58:47 +0100	[thread overview]
Message-ID: <20160222165847.GR2222@piout.net> (raw)
In-Reply-To: <56CB3A1D.6030604@gmail.com>

On 22/02/2016 at 11:41:01 -0500, Austin S. Hemmelgarn wrote :
> On 2016-02-22 11:18, Arnd Bergmann wrote:
> >On Monday 22 February 2016 16:56:53 Alexandre Belloni wrote:
> >>One other workaround is to asked distributions
> >>using systemd to stop using HCTOSYS so userspace would be responsible to
> >>set the system time and in that case we won't have the 32/64 discrepancy.
> >
> >I'm missing a bit of background here. This seems like a fairly useful
> >piece of infrastructure for the majority of the use cases (working RTC)
> >
> >How would the time get set when this is disabled? Is systemd able
> >to read the rtc and write it back to the kernel? That could in fact
> >be a nicer workaround for the problem, if it just does this before
> >setting up the timerfd.
> Traditional init systems on Linux have the option of using hwclock from
> util-linux to set the system time.  This is what Gentoo does by default, and
> I think Arch does it too, and I'm relatively certain that Debian and Ubuntu
> used to do it before they switched to systemd (I have no idea what they do
> now).  Based on the manpage for hwclock, it looks like systemd mandates that
> HCTOSYS is enabled in the kernel configuration, and then just calls hwclock
> to set the system timezone and correct for UTC.

I'm not sure it mandates HCTOSYS. On debian there is a udev rule that
needs the system time to already be set but from my point of view, it
doesn't matter whether it is from hwclock or HCTOSYS. systemd already
seems to read the RTC so it may as well set the system time if it needs
it.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
	rtc-linux@googlegroups.com,
	Alessandro Zummo <a.zummo@towertech.it>, Willy Tarreau <w@1wt.eu>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtc: Add an option to invalidate dates in 2038
Date: Mon, 22 Feb 2016 17:58:47 +0100	[thread overview]
Message-ID: <20160222165847.GR2222@piout.net> (raw)
In-Reply-To: <56CB3A1D.6030604@gmail.com>

On 22/02/2016 at 11:41:01 -0500, Austin S. Hemmelgarn wrote :
> On 2016-02-22 11:18, Arnd Bergmann wrote:
> >On Monday 22 February 2016 16:56:53 Alexandre Belloni wrote:
> >>One other workaround is to asked distributions
> >>using systemd to stop using HCTOSYS so userspace would be responsible to
> >>set the system time and in that case we won't have the 32/64 discrepancy.
> >
> >I'm missing a bit of background here. This seems like a fairly useful
> >piece of infrastructure for the majority of the use cases (working RTC)
> >
> >How would the time get set when this is disabled? Is systemd able
> >to read the rtc and write it back to the kernel? That could in fact
> >be a nicer workaround for the problem, if it just does this before
> >setting up the timerfd.
> Traditional init systems on Linux have the option of using hwclock from
> util-linux to set the system time.  This is what Gentoo does by default, and
> I think Arch does it too, and I'm relatively certain that Debian and Ubuntu
> used to do it before they switched to systemd (I have no idea what they do
> now).  Based on the manpage for hwclock, it looks like systemd mandates that
> HCTOSYS is enabled in the kernel configuration, and then just calls hwclock
> to set the system timezone and correct for UTC.

I'm not sure it mandates HCTOSYS. On debian there is a udev rule that
needs the system time to already be set but from my point of view, it
doesn't matter whether it is from hwclock or HCTOSYS. systemd already
seems to read the RTC so it may as well set the system time if it needs
it.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2016-02-22 17:09 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-20 19:10 [rtc-linux] [PATCH] rtc: Add an option to invalidate dates in 2038 Alexandre Belloni
2016-02-20 19:10 ` Alexandre Belloni
2016-02-20 19:43 ` [rtc-linux] " One Thousand Gnomes
2016-02-20 19:43   ` One Thousand Gnomes
2016-02-20 20:47   ` [rtc-linux] " Alexandre Belloni
2016-02-20 20:47     ` Alexandre Belloni
2016-02-20 22:16     ` [rtc-linux] " Arnd Bergmann
2016-02-20 22:16       ` Arnd Bergmann
2016-02-20 23:17       ` [rtc-linux] " Alexandre Belloni
2016-02-20 23:17         ` Alexandre Belloni
2016-02-20 23:42         ` [rtc-linux] " Alexandre Belloni
2016-02-20 23:42           ` Alexandre Belloni
2016-02-21 12:40         ` [rtc-linux] " One Thousand Gnomes
2016-02-21 12:40           ` One Thousand Gnomes
2016-02-22 13:00           ` [rtc-linux] " Alexandre Belloni
2016-02-22 13:00             ` Alexandre Belloni
2016-02-22 13:43             ` [rtc-linux] " One Thousand Gnomes
2016-02-22 13:43               ` One Thousand Gnomes
2016-02-22 15:44               ` [rtc-linux] " Arnd Bergmann
2016-02-22 15:44                 ` Arnd Bergmann
2016-02-22 15:56                 ` [rtc-linux] " Alexandre Belloni
2016-02-22 15:56                   ` Alexandre Belloni
2016-02-22 16:18                   ` [rtc-linux] " Arnd Bergmann
2016-02-22 16:18                     ` Arnd Bergmann
2016-02-22 16:40                     ` [rtc-linux] " Alexandre Belloni
2016-02-22 16:40                       ` Alexandre Belloni
2016-02-22 16:41                     ` [rtc-linux] " Austin S. Hemmelgarn
2016-02-22 16:41                       ` Austin S. Hemmelgarn
2016-02-22 16:58                       ` Alexandre Belloni [this message]
2016-02-22 16:58                         ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160222165847.GR2222@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=a.zummo@towertech.it \
    --cc=ahferroin7@gmail.com \
    --cc=arnd@arndb.de \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=w@1wt.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.