From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B884AC5519F for ; Sat, 14 Nov 2020 10:25:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6290C22252 for ; Sat, 14 Nov 2020 10:25:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726815AbgKNKZH convert rfc822-to-8bit (ORCPT ); Sat, 14 Nov 2020 05:25:07 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:34222 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726625AbgKNKZH (ORCPT ); Sat, 14 Nov 2020 05:25:07 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id CF8D51C0BC1; Sat, 14 Nov 2020 11:25:04 +0100 (CET) Date: Sat, 14 Nov 2020 11:25:03 +0100 From: Pavel Machek To: Lukasz Majewski Cc: Andrei Vagin , Dmitry Safonov , Thomas Gleixner , GNU C Library , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: Re: [Y2038][time namespaces] Question regarding CLOCK_REALTIME support plans in Linux time namespaces Message-ID: <20201114102503.GB1000@bug> References: <20201030110229.43f0773b@jawa> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20201030110229.43f0773b@jawa> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > I do have a question regarding the Linux time namespaces in respect of > adding support for virtualizing the CLOCK_REALTIME. > > According to patch description [1] and time_namespaces documentation > [2] the CLOCK_REALTIME is not supported (for now?) to avoid complexity > and overhead in the kernel. > > Is there any plan to add support for it in a near future? > > Why I'm asking? > > It looks like this kernel feature (with CLOCK_REALTIME support > available) would be very helpful for testing Y2038 compliance for e.g. > glibc 32 bit ports. > > To be more specific - it would be possible to modify time after time_t > 32 bit overflow (i.e. Y2038 bug) on the process running Y2038 > regression tests on the host system (64 bit one). By using Linux time > namespaces the system time will not be affected in any way. If big slowdown is acceptable... you can play games with ptrace. Project called "subterfugue" should have examples how to do that. Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html