Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4076227img; Tue, 26 Mar 2019 02:28:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqw29yY1GjlNK4rD7dIzZrBtbiyhs2Yoj0mv3E1M8/I3jc7iPMLEh+KwJ6a9WnytJ2N3uMJs X-Received: by 2002:a63:ad4b:: with SMTP id y11mr14191104pgo.405.1553592521722; Tue, 26 Mar 2019 02:28:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553592521; cv=none; d=google.com; s=arc-20160816; b=TdGiePLRbOJZZV8ExurTFbzuoLkeUldwWHTnTP7ai4vjxhi4UXadJwpMMyfiFHkw3n oj2IvUuh9ljAvKQNJKrilE3JW+GhHwxvUnOZFdVEkMl5EAKIwU6+bL80Dz6gkxLJFCUd PgldjtqPp2cxhOuEfRBg5SeCDIqOHhx9gdpw6fT369oI9WVYTkbL2E90jERvBKEBHnOA iormmCOEXJpVlDLqeXAZQL2m1BY+11VXssRnp7VsyRvIhD5/7m7f11C3bPPADan0uMcX ZOf4ZYsATNwp39loL3A/A/ZoL7/tbiYtYJdyIkFwc6vawGapO8cu0+GgSh5h08UGVI2O uKow== 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=agXq4oeSzzWA/DkGkMgdKCL9Kyar8sT3fGSTH6inAB0=; b=JYigtFlUfJBgVoMkXUe2YA4Vfz2kvCfztXhK8RE4EHZK6DjI6TDUxRyL7vc93i1Hgh a2ui76vNXa+fmtbEBZKN7YeWYqGIWpcubkHSl0SECpKGircWrREDvWujbBAjNOuz+C2R HRzpLz9nZ4YhBBaq0EWuMFyNzgNSK0mW24gjyz193zMnIIMYih68lulJxe3wC/hxCkOl 7VE+Tj1PDXwTrYHnD6I8MSDHOXMRVN75m4AR4WlG9P8nNX67z5SS3kTNYVgwjRORLdos Guyt1jExHkPecoXyVsXqKV9Sc7d3fUXuLR+f7IHqUbO15znhydSLNgZIcADJa9E/tssw gOQQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si15051405pfi.23.2019.03.26.02.28.25; Tue, 26 Mar 2019 02:28:41 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726413AbfCZJ0L (ORCPT + 99 others); Tue, 26 Mar 2019 05:26:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60448 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725497AbfCZJ0L (ORCPT ); Tue, 26 Mar 2019 05:26:11 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E49C52D7EB; Tue, 26 Mar 2019 09:26:10 +0000 (UTC) Received: from localhost (holly.tpb.lab.eng.brq.redhat.com [10.43.134.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F2BF82636E; Tue, 26 Mar 2019 09:26:08 +0000 (UTC) Date: Tue, 26 Mar 2019 10:26:07 +0100 From: Miroslav Lichvar To: Thomas Gleixner 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 Message-ID: <20190326092607.GE14186@localhost> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 26 Mar 2019 09:26:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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