Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4220788img; Tue, 26 Mar 2019 05:32:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/lLn8rwDKCrdWIPRXf8DseaEbsdFyzIiJWujiXecaoh/0GFlcYlZIzCivAPRw7YxOGM+i X-Received: by 2002:a63:cd06:: with SMTP id i6mr29092833pgg.267.1553603538011; Tue, 26 Mar 2019 05:32:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553603538; cv=none; d=google.com; s=arc-20160816; b=bIyivrEYrCUw39moaTBfEq6qW9+SpPQ4XTkWs7tcHG58UDakDqlMRSChQy7fX68jbi hVOYig7F4p5YYKPSW2gFdVK1vFgwQb78sE3hG6XBKffT0P3PGi9kaEyqkCpbqK4LWYGQ oBbw2jOFevFgLmp8T3Vxok3onwAcEtumPVw6zSAmHuEjtLfn/Y8vFfqBcQEeWhMnR4SM n+lgBa1mCAgW2UntWmA30JXv+3RGOBh4vj2q88nyBNMjBwK/oHd/6QUQVSMYai6NVqQp SK9a5VCvKHqL9LhwElBs86LDDcukGRar4EInyseGALkv9Iyg30rfDOyTU0A8x2dXfmsi iw7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=r8YnwxR8lCEWvUKMmmhpeBWg3JuFGWQG5wB0Z9yrl4A=; b=aI6+QoAoGA04m6aSbYymmVzAe+DhC4E0UXqlRehxk/DZjnzPKHw5ThA5itv4qwsBkm 2Te2uQZwCgbbLrwkLYoSjgdOZTiA+ILtXqyy+wba0ieiUhLOxiKBw5Y5oDW1nkF4MkN/ R7+TnI1nElASGqumEn96o41gIl+dYvEXY503rBoDFIqfHMNmjLifzvMRmrB//agGKI76 p3mQ+cJmCW4dkHD9f/E2qVXosp0XEcC20RzOeDyLJ/u6BvAEbYK6/do47+0/BxVG8c49 FTlz9+qZYohTPR5+NifXmR7oqxsnUNs0CaNHELZX/4OvYwnu8VtKz2ldZU279KF4jvKD M0kw== 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 76si13246550pge.555.2019.03.26.05.32.02; Tue, 26 Mar 2019 05:32:17 -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 S1731497AbfCZMbW (ORCPT + 99 others); Tue, 26 Mar 2019 08:31:22 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:48207 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726241AbfCZMbW (ORCPT ); Tue, 26 Mar 2019 08:31:22 -0400 Received: from p5492e2fc.dip0.t-ipconnect.de ([84.146.226.252] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1h8lEc-0004Tz-96; Tue, 26 Mar 2019 13:31:18 +0100 Date: Tue, 26 Mar 2019 13:31:16 +0100 (CET) From: Thomas Gleixner To: Miroslav Lichvar cc: LKML , John Stultz , Stephen Boyd , Arnd Bergmann , Richard Cochran , Hongbo Yao , Xiongfeng Wang , Peter Zijlstra Subject: Re: [PATCH] timekeeping: Force upper bound for setting CLOCK_REALTIME In-Reply-To: <20190326092607.GE14186@localhost> Message-ID: References: <20190326092607.GE14186@localhost> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Mar 2019, Miroslav Lichvar wrote: > 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. I'm fine with breaking a few tests on the way rather than having undefined behaviour and the constant flow of patches tackling the wrong end of the stick. Thanks, tglx