Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3018751pxu; Sat, 10 Oct 2020 16:18:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtomZ4R4YwJMyI+6itRb58eijGXz2ZxSJaeUxcIcUIUqF2wIRqS5t4AdqXGHQiZM/idjI0 X-Received: by 2002:aa7:c2d9:: with SMTP id m25mr6786968edp.226.1602371930609; Sat, 10 Oct 2020 16:18:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602371930; cv=none; d=google.com; s=arc-20160816; b=mVgplt/mHMNYqnQ60x2kVSt3PNkGejsxCwq9Js3vQXA82lIHeub9PJ0y6k501bkbWX UmvWz+fCVwrSKPWg9iZgSaxtW98Osd6p+9uym1GssW++eSl/vmvo0Lzby5dKcycjAr1n LVCUgRUa0FQ1fmOzpWlVekHDhFXOJKd95H5Qgftfxs6+JyXSZ7gBYkI8FCFsa9uKZJle cFo85tJUaypMKEoh8+u2gUSzSWS6Tih19NtpPFLapIMitWAWjcn+HTitTg750HQDym21 I3X4zqe7zF5zpQxp9e6A4ulU9PZJCBcZ9+z4qYwlUT/0pgE4NVT+B/in0euNAdclxqJe Me1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=Exa4s04Q1qDvNYBJlfTMMv9Ahu3ShSZgxxlQG5SBMpM=; b=RihoFH7kBrPTED0OxdQb+u+QJEdX8SKVGePLLlZRX80eMLGHePgltlyd4d9TgsbGoL zcl0SGfwqN7w+20emYTLvcVR77j4jIwPC6Qoksbj+eL7bwHkBIRCYIeKyxaRRnmJzXr6 0R/lgGYBXWDztZ2TmDmP1PrxE+k04U7LtmVI2Qexx7KbKNFgUQhU4ByVcVLthFM5L5vf 749SyWxiFfT5jpKLy/qTrOCI0OKZ6F7sQw33oXXeXLdX+i6hbp+5FXWUX57MJUg2Mezf muWQXHU94Y/M7/AZLWe0WABy+EXMs/n8BGFlXTL1ETHtyRDxtbaAhrPvwfO58RwO5XTi gB3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JYiDSgbE; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=jrQVfleg; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x17si8938347ejy.288.2020.10.10.16.18.28; Sat, 10 Oct 2020 16:18:50 -0700 (PDT) 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=@linutronix.de header.s=2020 header.b=JYiDSgbE; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=jrQVfleg; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388415AbgJJWxy (ORCPT + 99 others); Sat, 10 Oct 2020 18:53:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731319AbgJJTJZ (ORCPT ); Sat, 10 Oct 2020 15:09:25 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED339C08E750 for ; Sat, 10 Oct 2020 09:42:30 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602347848; 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=Exa4s04Q1qDvNYBJlfTMMv9Ahu3ShSZgxxlQG5SBMpM=; b=JYiDSgbELJOX8mGTXpBfycwLiqyr0VtxL4zCHAMG60V8tDwhz42XUuzaD9Wyx7hJCFpDHf o6ezZl4PItKfz531POh/m/Mm4K9MFszeNud39rUXzTFDZXQJOB/VOv1x5GHDkphcofjOtk mcfsOR/8zEeLmuMPdugMteMmwKsm2u5ZZyo3Ff0KQnF+AAGXqAi2L6Exvu+VKWbco6IED+ IP7F/7xWuiMITNZPnoDclgWOl/Ikt7huuz9GTBRO0ZVXtHmLV+LrPm7yx4wXS++EGvh3rs LCszEHB1mdvnsjrqTA9o9SV30ICAwbQekEqXfTH3AODZW7//ag2pQITORaPQyA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602347848; 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=Exa4s04Q1qDvNYBJlfTMMv9Ahu3ShSZgxxlQG5SBMpM=; b=jrQVflegs6ESlv9SGYR1oaSd131N8p+yDGRWf4ltiuVbLMrJpzJ3U1AQPhZgk8ind6gQr+ 0MCte9of3L/ovADQ== To: Michael =?utf-8?Q?Wei=C3=9F?= , Andrei Vagin , Christian Brauner Cc: Dmitry Safonov <0x7f454c46@gmail.com>, linux-kernel@vger.kernel.org, "J. Bruce Fields" , Chuck Lever , Trond Myklebust , Anna Schumaker Subject: Re: [PATCH v2 2/4] time: make getboottime64 aware of time namespace In-Reply-To: <3bb1af44-4245-365d-8ef4-ce17debc476f@aisec.fraunhofer.de> References: <20201008053944.32718-1-michael.weiss@aisec.fraunhofer.de> <20201008053944.32718-3-michael.weiss@aisec.fraunhofer.de> <20201009132815.5afulu5poh5ti57m@wittgenstein> <20201010071914.GA135401@gmail.com> <3bb1af44-4245-365d-8ef4-ce17debc476f@aisec.fraunhofer.de> Date: Sat, 10 Oct 2020 18:37:27 +0200 Message-ID: <871ri6rq9k.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michael, On Sat, Oct 10 2020 at 13:50, Michael Wei=C3=9F wrote: > On 10.10.20 09:19, Andrei Vagin wrote: >> And I think we need to consider an option to not change getbootime64 and >> apply a timens offset right in the show_stat(fs/proc/stat.c) >> function. That's what I meant and failed to express correctly. > Since the problems in softirq context mentioned from Thomas, > I would agree to Andrei's option to just patch proc/stat.c and leave > getboottime64 unchanged. > > Digging around in the kernel tree, I just found /proc/stat as the only > place where boottime is exposed to userspace, thus it seems a valid > option. Yes, I thought about a wrapper function which adds the namespace offset, but as it is the only place, open coding is fine. Thanks, tglx