From: Miroslav Lichvar <mlichvar@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
John Stultz <john.stultz@linaro.org>,
Stephen Boyd <sboyd@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Richard Cochran <richardcochran@gmail.com>,
Hongbo Yao <yaohongbo@huawei.com>,
Xiongfeng Wang <wangxiongfeng2@huawei.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] timekeeping: Force upper bound for setting CLOCK_REALTIME
Date: Tue, 26 Mar 2019 10:26:07 +0100 [thread overview]
Message-ID: <20190326092607.GE14186@localhost> (raw)
In-Reply-To: <alpine.DEB.2.21.1903231125480.2157@nanos.tec.linutronix.de>
On Sat, Mar 23, 2019 at 11:36:19AM +0100, Thomas Gleixner wrote:
> It is reasonable to force an upper bound for the various methods of setting
> CLOCK_REALTIME. Year 2262 is the absolute upper bound. Assume a maximum
> uptime of 30 years which is plenty enough even for esoteric embedded
> systems. That results in an upper bound of year 2232 for setting the time.
The patch looks good to me.
I like this approach better than using a larger value closer to the
overflow (e.g. one week) and stepping the clock back automatically
when the clock reaches that time, but I suspect it might possibly
break more tests (or any unusual applications messing with time) as a
much larger interval is now EINVAL.
Thanks,
--
Miroslav Lichvar
next prev parent reply other threads:[~2019-03-26 9:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-23 10:36 [PATCH] timekeeping: Force upper bound for setting CLOCK_REALTIME Thomas Gleixner
2019-03-26 9:26 ` Miroslav Lichvar [this message]
2019-03-26 12:31 ` Thomas Gleixner
2019-03-26 13:16 ` Arnd Bergmann
2019-03-26 23:00 ` Thomas Gleixner
2019-03-28 12:46 ` [tip:timers/core] " tip-bot for Thomas Gleixner
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=20190326092607.GE14186@localhost \
--to=mlichvar@redhat.com \
--cc=arnd@arndb.de \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=richardcochran@gmail.com \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=wangxiongfeng2@huawei.com \
--cc=yaohongbo@huawei.com \
/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.