From patchwork Mon Jul 6 15:49:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Brauner X-Patchwork-Id: 11646085 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 53F4D13B6 for ; Mon, 6 Jul 2020 15:51:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 29E6220715 for ; Mon, 6 Jul 2020 15:51:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uL6uXsDN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29E6220715 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ubuntu.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Xw/1IHplvQCu5zMQfSh09VuM+DoUGpIqTwoBRsAhEO0=; b=uL6uXsDNgqyypGl6PCIF4cItw 72r1QfQxOu2iwuVzLNqBCEea7w35kyDFT7rD3Kajsqjo6eoms242ohOavf3+OTJqMc+Yt5miKePGd Q2f7YQUoJESvzPY+SDCO6HwL2OnigoX1SAza60phJpivxrQ8m4767Y1nxB1Fgz9ha9k3ZOW9EA5/z DDh7OFZepUU1otWQmk0Yu+ctvQi0qDFTcqkj0ndFqcpKRG+FwQZnBO/L1yh2TJVZWPNnG/wJXauOw ApnzQR4tbMR/1LTqweP26nA8zT/BwKD63VifXu8dYxwlbZOEYURvDWafwVbidC96HB4kqvjZkUlf7 aZsgEwgQA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsTN3-00011A-0H; Mon, 06 Jul 2020 15:49:29 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsTMy-0000yE-Da for linux-arm-kernel@lists.infradead.org; Mon, 06 Jul 2020 15:49:25 +0000 Received: from ip5f5af08c.dynamic.kabel-deutschland.de ([95.90.240.140] helo=wittgenstein.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jsTMt-0005O9-PC; Mon, 06 Jul 2020 15:49:19 +0000 From: Christian Brauner To: linux-kernel@vger.kernel.org Subject: [PATCH v2 0/4] nsproxy: support CLONE_NEWTIME with setns() Date: Mon, 6 Jul 2020 17:49:08 +0200 Message-Id: <20200706154912.3248030-1-christian.brauner@ubuntu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200706_114924_605133_C205BFB4 X-CRM114-Status: UNSURE ( 8.03 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.4 (-) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-1.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [91.189.89.112 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [91.189.89.112 listed in wl.mailspike.net] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [95.90.240.140 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Dmitry Safonov , Catalin Marinas , x86@kernel.org, Andrei Vagin , Michael Kerrisk , Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Will Deacon , Christian Brauner , linux-arm-kernel@lists.infradead.org, Serge Hallyn Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hey, After having synced with Andrei with the ARM time namespace support patchset we've decided to make vdso_join_timens() a function that cannot fail but not yet change its return type so the changes for ARM can proceed independently. We will simply have a follow-up patch right after these changes land during the v5.9 merge window that changes vdso_join_timens() from returning an int to void. So far setns() with pidfds was missing time namespace support. This was partially due to it simply not being implemented but also because vdso_join_timens() could still fail which made switching to multiple namespaces atomically problematic. This series first fixes vdso_join_timens() to never fail, introduces timens_commit() and finally adds CLONE_NEWTIME support for setns(). Thanks! Christian Christian Brauner (4): timens: make vdso_join_timens() always succeed timens: add timens_commit() helper nsproxy: support CLONE_NEWTIME with setns() tests: add CLONE_NEWTIME setns tests arch/x86/entry/vdso/vma.c | 5 +- include/linux/time_namespace.h | 6 ++ kernel/nsproxy.c | 21 ++++- kernel/time/namespace.c | 22 ++---- tools/testing/selftests/pidfd/pidfd.h | 4 + .../selftests/pidfd/pidfd_setns_test.c | 76 +++++++++++++++++++ 6 files changed, 115 insertions(+), 19 deletions(-) base-commit: dcb7fd82c75ee2d6e6f9d8cc71c52519ed52e258