Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp14155ybl; Tue, 13 Aug 2019 14:57:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCyzNWQQJOjs8QFwwfviUW7DaGFiFWZaJhFC4w/yiCCEc5Qod0tWIHvNbQ+yUOLnYR6zkB X-Received: by 2002:a62:cdc3:: with SMTP id o186mr43424230pfg.168.1565733446936; Tue, 13 Aug 2019 14:57:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565733446; cv=none; d=google.com; s=arc-20160816; b=aN3fFlNfNxGWI4gj0gnwppvVf6Qligi+qrY+m980vOFuwlW1kH4XJ6MR8aieNcJbcL srj4xmSFMGMhunqyE5cfxvMz+KaLkq9WczY4lvqeHH+wzkVCCjpey+6/NJRvMQhyUPTE VyFmOYQGGh/dHdjKnqzB20nEg+KvtS6DxD5a7ZqX1znGXhaFXxV7mk0u0OoniWZTXJNn iqUOyJxPiPE+AbCEA+qkmJqgHm3pRuWKSCa5qHu6b6s8RyklZMtmUlJr+MGY1X1iKWyz VGOPdiIi9ii3RL8XEcGFrq+I+nQur0L7eJKMpDNQbZwPfwmbXWCFJ15oBLAqRtpRPS2m dgog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=H8SGrniMU1YmFjbvCwhOp3L63PTlcC7zaLArbvQ0+dE=; b=edgq5sY9vJ40M/7R9acardabEZEK8a5JFCNeOsi2mskfdd95KcpsnmBMoN41oGFgyx Nmiw7yPYUKkVV6N9hmfH5wVlf3L7S94e9MtMi5J0pFc9PhHxI532I6UuIli1ipR+SQHA 3ygS+tx+VlYZTDJtLUh6ruoKwTeQAsyRkyuG8ndr6iZpXa1XJtEQP/J6Di8E5LC7cghb +qzrGr3ndHADGFwqTMDCnKzKGpcNbBKWZHSRDJTtWGFXG6a6sKgR8xitHzoELC3zv738 awhxN3L48kmjbZzx0B3Gwh0Nuo+sJRaVMQlxqXvXtw25Eow5+jHDQNz3IFuasLoEv7mt ZO7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y9si69023635pfm.236.2019.08.13.14.56.58; Tue, 13 Aug 2019 14:57:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726689AbfHMV4U (ORCPT + 99 others); Tue, 13 Aug 2019 17:56:20 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:47889 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726155AbfHMV4U (ORCPT ); Tue, 13 Aug 2019 17:56:20 -0400 X-Originating-IP: 90.65.161.137 Received: from localhost (lfbn-1-1545-137.w90-65.abo.wanadoo.fr [90.65.161.137]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id D4C101BF209; Tue, 13 Aug 2019 21:56:15 +0000 (UTC) Date: Tue, 13 Aug 2019 23:56:15 +0200 From: Alexandre Belloni To: Linus Torvalds Cc: Arnd Bergmann , Linux Kernel Mailing List , Thomas Gleixner , John Stultz , Stephen Boyd , Florian Weimer , Theodore Ts'o , "H. Peter Anvin" , Palmer Dabbelt , Alistair Francis , GNU C Library , Karel Zak , Lennart Poettering , OGAWA Hirofumi Subject: Re: New kernel interface for sys_tz and timewarp? Message-ID: <20190813215615.GE3600@piout.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/08/2019 10:30:34-0700, Linus Torvalds wrote: > On Tue, Aug 13, 2019 at 2:06 AM Arnd Bergmann 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