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: <20190813215615.GE3600@piout.net>
Date:   Tue, 13 Aug 2019 23:56:15 +0200
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        John Stultz <john.stultz@...aro.org>,
        Stephen Boyd <sboyd@...nel.org>,
        Florian Weimer <fweimer@...hat.com>,
        Theodore Ts'o <tytso@....edu>,
        "H. Peter Anvin" <hpa@...or.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Alistair Francis <alistair.francis@....com>,
        GNU C Library <libc-alpha@...rceware.org>,
        Karel Zak <kzak@...hat.com>,
        Lennart Poettering <lennart@...ttering.net>,
        OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Subject: Re: New kernel interface for sys_tz and timewarp?

On 13/08/2019 10:30:34-0700, Linus Torvalds wrote:
> On Tue, Aug 13, 2019 at 2:06 AM Arnd Bergmann <arnd@...db.de> wrote:
> >
> > * Should we allow setting the sys_tz on new architectures that use only
> >   time64 interfaces at all, or should we try to get away from that anyway?
> 
> We should not do TZ on a kernel level at all. At least not a global
> one. It makes no sense.
> 
> If the original TZ had been defined to have some sane model (perhaps
> per session? Something like that), it would be worth doing. As it is,
> a global TZ is just plain wrong. Per process would be sane (but
> largely useless, I suspect).
> 
> > * Should the NTP timewarp setting ("int persistent_clock_is_local" and
> >   its offset) be controllable separately from the timezone used in other
> >   drivers?
> >
> > * If we want keep having a way to set the sys_tz, what interface
> > should that use?
> 
> I suspect we need to have _some_ way to set the kernel TZ for legacy
> reasons, but it should be deprecated and if we can make do without it
> entirely on architectures where the legacy doesn't make sense, then
> all the better.
> 
> I suspect the only actual _valid_ use in the kernel for a time zone
> setting is likely for RTC clock setting, but even that isn't really
> "global", as much as "per RTC".
> 

Userspace doesn't need help from the kernel to set the RTC using local
time if necessary, this info is in /etc/adjtime and hwclock uses it
correctly. It is only needed when the kernel sets the rtc time 

> That said, if glibc has some sane semantics for TZ, maybe the kernel
> can help with that. But I assume/think that glibc uses (a) environment
> variables and (b) a filesystem-set default (per-user file with a
> system-wide default? I don't know what people do). I suspect the
> kernel can't really do any better.
> 
>                 Linus

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ