Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp380448ybg; Thu, 19 Mar 2020 01:18:32 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuTax6NtckB4RzhKSRjMNqO+QQuVNT563ObFNF+TlXfiieudgLjlseRPDyYYXzgHgsmTt6S X-Received: by 2002:a9d:21f5:: with SMTP id s108mr1222181otb.227.1584605912123; Thu, 19 Mar 2020 01:18:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584605912; cv=none; d=google.com; s=arc-20160816; b=Bpgqj0jVra0FjAGanz5klMZrPoEy9L4MDwJ8mDn5YeG6mswP0fj3tB2gV4enbs5bRp 4gryop+dyTEqM0nis7/O+gNwZl28Pj5wjaIdrRJnAfTgdeOpOs8kK55HajC2WFr/2xNn GxIlCZqJHivHg3P1NZoILQkgyve+7kpZbMVuihY+9pG+0hJN+5Z1DwdqDV5+eQxVMzwy Fa2VD/MRqSfys/hL1QwZalySpVA3b4HvbCZPMAeJshMif+7GNhiAQiLMLqXODcxknBMh 2IF6soy4d+7qvdiCIHEMSJMxPMIxYT4kfPSzEs4IGpBr9WcAU5JplNpMsmiJS85twfHu 5Djg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=t1XRtsoal6H3X42CBaw3fcHIg9krOVaaleQiGWvuaVA=; b=vJ2Aox7hBTzXKocPujxQobShIS/QZuy9nlC34QXSd7Ob6QaIZuVh+RnP2A7g/fixLM hVzJtkRmJ3DDxDjm9jTlH0zXuj2KpcJknEDQYFAIyoXYXb9NUu0MheNu4oB/UZAIkWGo mGQ0hbpbGl1ehBS16tfHtTTZVHUQ0mfrh3kmzgXwnKf8Cvg4rp45z5AlWU36C4pcjxhK z0CIhvDjuJz8GwbaRychyc246zJyguI5IPetFjS4c+rGfHZPZ0U9rrHhkFGq8q6kyZ4I Uz/u6oUAf4CQu7qB36uiP945xHZEvCIZBT89SB/Jn9aDuiz8EAkhvrqD4pLS05FzkGzt 04XA== 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 c201si709465oib.57.2020.03.19.01.18.19; Thu, 19 Mar 2020 01:18:32 -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 S1726855AbgCSIRC (ORCPT + 99 others); Thu, 19 Mar 2020 04:17:02 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:44423 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726188AbgCSIRC (ORCPT ); Thu, 19 Mar 2020 04:17:02 -0400 Received: from mail-qv1-f51.google.com ([209.85.219.51]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPSA (Nemesis) id 1McYTD-1jrCVt0zEr-00d1a5; Thu, 19 Mar 2020 09:17:00 +0100 Received: by mail-qv1-f51.google.com with SMTP id m2so521131qvu.13; Thu, 19 Mar 2020 01:16:59 -0700 (PDT) X-Gm-Message-State: ANhLgQ0MVelGgW9A3MfvnGDpwvgy/q3TmjsMOevt+oecnwlxFWjRnB42 S2dt40Ltn611sWKE3JcZ0xOBrnCpl0YPQKwj11E= X-Received: by 2002:a0c:f647:: with SMTP id s7mr1832971qvm.4.1584605819082; Thu, 19 Mar 2020 01:16:59 -0700 (PDT) MIME-Version: 1.0 References: <20200317083043.226593-1-areber@redhat.com> <20200319081137.GC223854@dcbz.redhat.com> In-Reply-To: <20200319081137.GC223854@dcbz.redhat.com> From: Arnd Bergmann Date: Thu, 19 Mar 2020 09:16:43 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: clone3: allow creation of time namespace with offset To: Adrian Reber Cc: Christian Brauner , Eric Biederman , Pavel Emelyanov , Oleg Nesterov , Dmitry Safonov <0x7f454c46@gmail.com>, Andrei Vagin , "linux-kernel@vger.kernel.org" , Mike Rapoport , Radostin Stoyanov , Michael Kerrisk , Cyrill Gorcunov , Thomas Gleixner , Aleksa Sarai , Linux API Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:+GajmnIHBBfa+wnucP62mdW4D0KSk3X5HuJXrapNIX2Pm0HqAVy T87l3rzDqMJGdaKHogrdbdIQt1FedsI0goItnZky84ZVHXfyVgIRphy0cvutrqaJdHwR2Lq J4nGDaDDzHubPhv3M+tkbunOd9knDvrVo17G0WDWm0R6olNu1fvJoGtoupP72UZrT7x6kmx z0jDx9T6khcAMNV4uYXrA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:7gdf/FqWgSE=:+/s7qhnV4QaCD2FzAuaFxm AAzFdbtxiGhn3PfwVUkXVqErzqPBt1nCWXxLC6/dG/HEhlIuclDxnKBnp90P0T83YXEskcShF xpnA4cdNCerXyT0XinKAAUYpNdgSjToQMLGyBC6n2zSskwFXIFepnWv3PsjrFagkY/Ku92A/d +voIvYfG8V48sV2dhpz1iwB8iIq3ionPsb9BcHbE/1af/0mB2WiBrWVhZH1gCUVvACMdqTQjA FA3UIfh8Bw0ml98bjDzOB8YW1jdsTnNEdq+aAlTpjWywDBWpIQqovpxlUBb0P4KEJ3wc4B1Bv h3LafyAGrgVem/ZX/Dhhvlfdk83uWEvfwG2dhudSaPgeZDQSc2WSNTXwc25zQOg/f9V9bHUIO JAMwJFtfTJCOJ5plvCpvZEJ4On1+xo2JHXDI2E8dX2zkhzJ5IwVLxQtvGPw3FRvwXCxBrh8G+ nBBj1oExdaVCZpbOtsnc/vlIxLCi+ItpPvlkggYqEh80pnSvSbK3ZltUWH7oCKEDo6/hdt4Lc 0yzDyt963QBwJiSD1P8aEwCELs4zbX0/D9/ptpKTS2TkcBuI7bZPxMAYxdbpSWm2+9IMZrTTc Qhgi+iQIDXEGi+GzuJtjKrqtttldpL9dJUsno4OWjWqBNu9JKk3uKI51OCDCzM55KWwuLsWTc 9PIiLkjxAUgt3OGefT4G/mQFcsKTiGQuTNBEDtosEdmTxQlSR+B4NcCs9fw0v04B32RZKF7+Z sZAC9iDdc+snPBf0IZH+s9VhxEP3OBbWT9yYvPr5PAXbotkWQwGqCqtBhTlgyHzrLmOWYcr1N TjyeKOjT2HmzRG82yScyt/oAeT70A0+PgRnh4VsSlj7mAj4Yks= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 19, 2020 at 9:11 AM Adrian Reber wrote: > With Arnd's idea of only using nanoseconds, timens_offset would then > contain something like this: > > struct timens_offset { > __aligned_s64 monotonic_offset_ns; > __aligned_s64 boottime_offset_ns; > }; > > I kind of prefer adding boottime and monotonic directly to struct clone_args > > __aligned_u64 tls; > __aligned_u64 set_tid; > __aligned_u64 set_tid_size; > + __aligned_s64 monotonic_offset_ns; > + __aligned_s64 boottime_offset_ns; > }; I would also prefer the second approach using two 64-bit integers instead of a pointer, as it keeps the interface simpler to implement and simpler to interpret by other tools. Arnd