From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Karl Mehltretter <kmehltretter@gmail.com>,
linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtc: class: Make the time32 hctosys limit configurable
Date: Mon, 5 Oct 2026 15:49:45 +0200 [thread overview]
Message-ID: <202610051349454ed35b56@mail.local> (raw)
In-Reply-To: <d7825e87-93f2-4444-bf3b-45a4127de7a9@app.fastmail.com>
On 24/09/2026 17:07:30+0200, Arnd Bergmann wrote:
> On Tue, Sep 22, 2026, at 23:37, Alexandre Belloni wrote:
> > On 19/09/2026 11:16:29+0200, Arnd Bergmann wrote:
> >> On Sat, Sep 19, 2026, at 02:10, Karl Mehltretter wrote:
> >>
> >> config RTC_HCTOSYS_TIME32_LIMIT
> >> bool "Reject RTC dates after the 2038 cutoff"
> >> depends on RTC_HCTOSYS && !64BIT && COMPAT_32BIT_TIME
> >> default y
> >>
> >> to completely disallow it. I think we should wait for Alexandre
> >> to comment here, as it's his subsystem in the end and I'm sure
> >> he has an opinion on the matter.
> >>
> >
> > I gave it some thought for the past month as this is an issue that is
> > regularly brought up.
> >
> > The first thing is that this is an issue that disappears as soon as
> > RTC_HCTOSYS is not used. RTC_HCTOSYS has plenty of issue and one of
> > those is that is doesn't actually work well with NTP. There is a fix for
> > this and it would slow down every boot by a second or two.
>
> Sure, simply disallowing RTC_HCTOSYS on any build that contains support
> for time32 userspace would also avoid this.
>
> > The main issue is that systemd decided to mandate RTC_HCTOSYS when
> > raising up the issue, the answer is that it is unacceptable to have logs
> > that are not properly dated until userspace sets the system time. But
> > letting userspace set the system time simply solves the issue as it will
> > always set a time that it can handle, even if not correct.
>
> Not sure what exactly you are suggesting here. Do you mean we should
> try again to address this in systemd in order to no longer need
> the RTC_HCTOSYS hack?
>
Well I guess we'll get the same answer that this is too late in the boot
process.
My proposed solution is to have a way to tell the kernel what size of
time_t userspace actually supports as there is no way to automatically
detect it. That's why I was thinking a kernel cmdline parameter would
fit. This would allow us to be 100% correct.
Else, I'm fine with your last proposal. I guess this would leave us with
two unhandled cases:
- 64bit systems with 32 bit userspace that you said we don't want to
support
- 32bit systems with 64bit time_t userspace that would not work
properly with the default configuration.
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-10-05 13:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 21:25 Karl Mehltretter
2026-09-15 5:48 ` Arnd Bergmann
2026-09-15 22:37 ` Karl Mehltretter
2026-09-16 6:56 ` Arnd Bergmann
2026-09-19 0:10 ` Karl Mehltretter
2026-09-19 9:16 ` Arnd Bergmann
2026-09-22 21:37 ` Alexandre Belloni
2026-09-24 15:07 ` Arnd Bergmann
2026-10-05 13:49 ` Alexandre Belloni [this message]
2026-10-06 12:33 ` Arnd Bergmann
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=202610051349454ed35b56@mail.local \
--to=alexandre.belloni@bootlin.com \
--cc=arnd@arndb.de \
--cc=kmehltretter@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®