From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) Subject: Re: design of user namespaces Date: Tue, 01 Jul 2008 00:35:33 -0700 Message-ID: References: <20080620140510.GA21720@us.ibm.com> <20080620205508.GA8429@us.ibm.com> <20080630211325.GA27738@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080630211325.GA27738-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> (Serge E. Hallyn's message of "Mon, 30 Jun 2008 16:13:25 -0500") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Serge E. Hallyn" Cc: Linux Containers List-Id: containers.vger.kernel.org "Serge E. Hallyn" writes: > Quoting Eric W. Biederman (ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org): >> >> The very important points are that it is a remount of an existing mount >> so that we don't have to worry about corrupted filesystem attacks, and >> that authentication is performed at mount time. > > Conceptually that (making corrupted fs attacks a non-issue) is > wonderful. Practically, I may be missing something: When you say > remount, it seems you must either mean a bind mount or a remount. If > remount, then that will want to change superblock flags. If the > child userns(+child mntns) does a real remount, then that will change > the flags for the parent ns as well, right? > > If instead we do a bind mount we don't have that problem, but then the > fs can't be the one doing the user namespace work. > > I'm probably missing something. Essentially I am creating a new mount operation that is a cousin of a remount. Unlike a real remount you can't change the super flags. Unlike a bind mount you get the fs involved, and you pass in a string of flags that the fs can interpret in a standard way. I expect the flags you pass in would be a subset of what is allowed in a normal remount. Which is why I was calling it nativemount. Although usernsmount may be better. Eric