From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 7 Feb 2017 10:10:40 -0800 From: Christoph Hellwig To: Amir Goldstein Cc: James Bottomley , Christoph Hellwig , Djalal Harouni , Chris Mason , Theodore Tso , Josh Triplett , "Eric W. Biederman" , 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 Subject: Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount Message-ID: <20170207181040.GA18551@infradead.org> References: <1486235880.2484.17.camel@HansenPartnership.com> <1486235972.2484.19.camel@HansenPartnership.com> <20170207091924.GA13995@infradead.org> <1486485440.2488.15.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: On Tue, Feb 07, 2017 at 07:59:00PM +0200, Amir Goldstein wrote: > I am not even sure that would be enough. > dentry does not contain information about the mount user came from, > and sb contains only information about the user ns of the mounter of > the file system, not the mounter of the bind mount, right? > I think I am missing some big pieces of the big picture. > Would love to hear what Eric has to say. IFF we want to do what shiftfs does properly we need vfsmount + inode, no need for the dentry. But maybe we need to go back and decice if we want to allow uid/gid remapping for arbitrary subtrees anyway. Another option would be to require something like a project as used for project quotas as the root. This would also be conveniant as it could storge the used remapping tables.