From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934842AbdBQRVD (ORCPT ); Fri, 17 Feb 2017 12:21:03 -0500 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:44674 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934203AbdBQRU7 (ORCPT ); Fri, 17 Feb 2017 12:20:59 -0500 Message-ID: <1487351993.4351.17.camel@HansenPartnership.com> Subject: Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount From: James Bottomley To: "Eric W. Biederman" Cc: Vivek Goyal , Amir Goldstein , Djalal Harouni , Chris Mason , Theodore Tso , Josh Triplett , Andy Lutomirski , Seth Forshee , linux-fsdevel , linux-kernel , LSM List , Dongsu Park , David Herrmann , Miklos Szeredi , Alban Crequy , Al Viro , "Serge E. Hallyn" , Phil Estes Date: Fri, 17 Feb 2017 09:19:53 -0800 In-Reply-To: <87a89l7f4y.fsf@xmission.com> References: <1486235880.2484.17.camel@HansenPartnership.com> <1486235972.2484.19.camel@HansenPartnership.com> <1486343891.2496.54.camel@HansenPartnership.com> <20170214230305.GC4017@redhat.com> <1487115955.3133.73.camel@HansenPartnership.com> <20170215141734.GA2101@redhat.com> <1487260318.2944.18.camel@HansenPartnership.com> <20170216164233.GC23490@redhat.com> <1487264301.2944.51.camel@HansenPartnership.com> <87a89l7f4y.fsf@xmission.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2017-02-17 at 14:57 +1300, Eric W. Biederman wrote: > I think I am missing something but I completely do not understand > that subthread that says use file marks and perform the work in the > vfs. The problem is that fundamentally we need multiple mappings and > I don't see a mark on a file (even an inherited mark) providing the > mapping so I don't see the point. The point of the mark is that it's a statement by the system administrator that the underlying subtree is safe to be mounted by an unprivileged container in the containers user view (i.e. with current_user_ns() == s_user_ns). For the unprivileged container there's no real arbitrary s_user_ns use case because the unprivileged container must prove it can set up the mapping, so it would likely always be mounting from within a user_ns with the mapping it wanted. James