From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55732 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726253AbeHUK60 (ORCPT ); Tue, 21 Aug 2018 06:58:26 -0400 From: David Howells In-Reply-To: <561.1534836806@warthog.procyon.org.uk> References: <561.1534836806@warthog.procyon.org.uk> <20180816073407.12567-1-avagin@openvz.org> Cc: dhowells@redhat.com, Andrei Vagin , linux-fsdevel@vger.kernel.org, Andrei Vagin , Eric Biederman , Alexander Viro Subject: Re: [PATCH dhowells/mount-api] proc: set a proper user namespace for fs_context MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <921.1534837162.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Tue, 21 Aug 2018 08:39:22 +0100 Message-ID: <922.1534837162@warthog.procyon.org.uk> To: unlisted-recipients:; (no To-header on input) Sender: linux-fsdevel-owner@vger.kernel.org List-ID: David Howells wrote: > > A user namespace should be taken from a pidns for which a procfs is created. > > That would seem wrong. Shouldn't the superblock user_ns be from the mounter? Ah, no. The change is correct. What the patch description doesn't mention is that this is when a new pid namespace is setting up its own proc filesystem. I'll change the subject and patch body to: proc: Set correct userns for new proc super created by a new pid_namespace Fix the setting up a new proc superblock for a new pid_namespace such that the user_ns for that proc superblock needs to be taken from the new pid_namespace and not the active process. which I think describes it better. David