Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp409950pxu; Thu, 26 Nov 2020 01:38:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJyG7+n4qpR2/FqIbZuAFlyqlJEGl00eQWdNfTPQZaFnnU0zzzkZ5xIbtD9j/6Bn5Fq0GwWF X-Received: by 2002:a05:6402:19b4:: with SMTP id o20mr1655700edz.103.1606383521980; Thu, 26 Nov 2020 01:38:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606383521; cv=none; d=google.com; s=arc-20160816; b=Oes/pVySUb60ZffHKsk5LxNVE7jImCqpal1BIdhl8G2BHM9KzJw3PVwDWxEdwa3JcL Uh3TecX0M0cjqXhKzQqZDJKn5htBroIAG2UzA/44JTjRI18vs0HBJ2KawApUb+LVmNLM pxVMfCIL1vbcDcYOXjc+yxPVxVhpvl5ie/u6SmGRQwsAjc11c2A3IN6DFgcNd/tDVnba SiIfP+Us3yVS0dlN+2FOhKjb2cgkMQmNSg7dQtIJqKyO6/mwXFpqBjteGrRozvYDJJLF wV98/dsLemLDL4kAzH1Xl6EVuZubQfoyN5hQtpZX5hgdR0LMdzo+ReLd28E2YmJ+/z8P zM4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=Df+7exZ3hv2z9eba20+NxhLFS3WKhK1S603rVKR8sjU=; b=rd6Cy7S84328lbTeKdgs5hn4IKDL7HGr5qhr1Y79ek8GpvtK7593ioADszxWpa1NfO NNwnX0/zvgCWLNNUla99RtCM27Joy5FZP8AqXz/Dh1zCnQL6wal8YGjKDy4+twaIk/bN h1WsoyDF+EnSx0GJzC8kul/HS0tyMbv9ArJh/7tfXX2xBRDrCliCtAn+Xk2fonR6cnwC RC0Ury6qQfZ2cKJe1FqRoJZMq/afbiiy02hTmn945quqJ5uf/F41mrv62y98jIBhbO5G 4YPjyhZ75i8KpqiNpSeGPbnjoKhW656gCS8+0WkiyFPA5uOOMpjfj+EwQ8k/tAnNKAw8 tLHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Z/x5Milc"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u24si2710483ejg.738.2020.11.26.01.38.18; Thu, 26 Nov 2020 01:38:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Z/x5Milc"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733016AbgKZDFh (ORCPT + 99 others); Wed, 25 Nov 2020 22:05:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:33441 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732425AbgKZDFh (ORCPT ); Wed, 25 Nov 2020 22:05:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606359935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Df+7exZ3hv2z9eba20+NxhLFS3WKhK1S603rVKR8sjU=; b=Z/x5MilcnRaszEcghk8iq9yjYZkXoW4b+YIgXupOJGw86u9BhZFAPTkyzTDTf/f3/61g1l JzU1SgFPLoEcyBDIhc7X/G0qW1xuzMQe9ULGTyKiQv26t/pYNVdbOjRCeNY67o7NWfdxfa mk+YuYuEYtSYWI7FDxoBaesUom3uyOQ= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-29-6K9lIBFjPvCq1hlbyaXQEA-1; Wed, 25 Nov 2020 22:05:33 -0500 X-MC-Unique: 6K9lIBFjPvCq1hlbyaXQEA-1 Received: by mail-qk1-f198.google.com with SMTP id c71so525514qkg.21 for ; Wed, 25 Nov 2020 19:05:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Df+7exZ3hv2z9eba20+NxhLFS3WKhK1S603rVKR8sjU=; b=rBmVXdMRk8w5f4TSmLzRYwXFygCMWd0oxp/XU2phacsvM6lCbzT9NLg7onVSsv5EKX /CjAx4dvxGFRMlI8k3WrTiLtmVbsETdV8Y8x5L/EOgK8YPFkUUp01dwPpLnsTs32v01t h+9QxY5IAXLK2ONnsDvnpUquKd3lgOJFvTMFkE5UKfBYz6cWfrQlDfi61VfCBMr+gu5o rsIK+ISFM1i5CLfnDVwMTGDfJmWwgIR8rX/hrAoVpLUkGYGtnsTEWIMe4A7nEWzdSs+e HWl0In1V1+ig4WYz05zodv+vDsIQb5KXB0PIPzgv6nza2eDCTRoI10rClIrdc+7mrriT lbKQ== X-Gm-Message-State: AOAM532XgFStqv4OGYl3AON9WrxjLGXVfZCnso6gYmHENwwtjsjdmCE7 TDAcsoNMqRwfKJZrCmRju9VTFm2h0bdaJ9ewLO2cStLMejxcdSaM8si7e6TdIhoS2k2MkUiv+FL mtT/OHQTLxfBox1bCCLp4JU8w X-Received: by 2002:a37:6786:: with SMTP id b128mr1243223qkc.7.1606359933369; Wed, 25 Nov 2020 19:05:33 -0800 (PST) X-Received: by 2002:a37:6786:: with SMTP id b128mr1243205qkc.7.1606359933067; Wed, 25 Nov 2020 19:05:33 -0800 (PST) Received: from [192.168.1.16] (198-84-214-74.cpe.teksavvy.com. [198.84.214.74]) by smtp.gmail.com with ESMTPSA id l62sm1470148qkf.121.2020.11.25.19.05.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Nov 2020 19:05:32 -0800 (PST) Subject: Re: [Y2038][time namespaces] Question regarding CLOCK_REALTIME support plans in Linux time namespaces To: Thomas Gleixner , Zack Weinberg , Cyril Hrubis Cc: Dmitry Safonov , Andrei Vagin , GNU C Library , Linux Kernel Mailing List , =?UTF-8?B?UGV0ciDFoHBhxI1law==?= References: <20201030110229.43f0773b@jawa> <20201030135816.GA1790@yuki.lan> <87sg9vn40t.fsf@nanos.tec.linutronix.de> <72bbb207-b041-7710-98ad-b08579fe17e4@redhat.com> <87h7qbmqc3.fsf@nanos.tec.linutronix.de> <7bb5837f-1ff6-2b2c-089e-e2441d31ddb2@redhat.com> <87k0v7kwdc.fsf@nanos.tec.linutronix.de> <7a4d7b14-1f0b-4c40-2bd1-2582d8b71868@redhat.com> <87y2jej8mp.fsf@nanos.tec.linutronix.de> <87wnygopen.fsf@nanos.tec.linutronix.de> <5c382ef4-c505-5629-a85c-abae67c05c7c@redhat.com> <87pn41j7jx.fsf@nanos.tec.linutronix.de> From: Carlos O'Donell Organization: Red Hat Message-ID: <1d3d00ac-c7a0-7168-0450-8a0e1499ea2b@redhat.com> Date: Wed, 25 Nov 2020 22:05:30 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <87pn41j7jx.fsf@nanos.tec.linutronix.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/25/20 7:17 PM, Thomas Gleixner wrote: > Carlos, Petr, > > On Wed, Nov 25 2020 at 15:37, Carlos O'Donell wrote: >> On 11/19/20 7:14 PM, Thomas Gleixner wrote: >>> So from my point of view asking for distorted time still _is_ a request >>> for ponies. >> >> I'm happy if you say it's more work than the value it provides. > > Thinking more about it. Would a facility which provides: > > CLOCK_FAKE_MONOTONIC|BOOTTIME|REALTIME > > where you can go wild on setting time to whatever you want solve > your problem? We would need a way to inject CLOCK_FAKE_* in lieu of the real constants. There are only two straight forward ways I know how to do that and they aren't very useful e.g. alternative build, syscall hot-path debug code to alter the constant. We might write a syscall interception framework using seccomp and SECCOMP_RET_TRACE, but that involves ptrace'ing the process under test, and is equivalent to a micro-sandbox. I'm not against that idea for testing; we would test what we ship. I don't think eBPF can modify the incoming arguments. I need to go check if systemtap can modify incoming arguments; I've never done that in any script. In what other ways can we inject the new constants? -- Cheers, Carlos.