From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f52.google.com ([209.85.218.52]:35088 "EHLO mail-oi0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821AbcFVTth (ORCPT ); Wed, 22 Jun 2016 15:49:37 -0400 Received: by mail-oi0-f52.google.com with SMTP id r2so38317494oih.2 for ; Wed, 22 Jun 2016 12:49:37 -0700 (PDT) Date: Wed, 22 Jun 2016 14:49:35 -0500 From: Seth Forshee To: "Eric W. Biederman" Cc: Linux Containers , linux-fsdevel@vger.kernel.org, Miklos Szeredi , James Bottomley , Djalal Harouni , "Serge E. Hallyn" , Andy Lutomirski Subject: Re: [PATCH review 12/13] userns: Remove implicit MNT_NODEV fragility. Message-ID: <20160622194935.GG125285@ubuntu-hedt> References: <87fus77pns.fsf@x220.int.ebiederm.org> <20160620172130.15712-1-ebiederm@xmission.com> <20160620172130.15712-12-ebiederm@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160620172130.15712-12-ebiederm@xmission.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Jun 20, 2016 at 12:21:29PM -0500, Eric W. Biederman wrote: > Replace the implict setting of MNT_NODEV on mounts that happen with > just user namespace permissions with an implicit setting of SB_I_NODEV > in s_iflags. The visibility of the implicit MNT_NODEV has caused > problems in the past. > > With this change the fragile case where an implicit MNT_NODEV needs to > be preserved in do_remount is removed. Using SB_I_NODEV is much less > fragile as s_iflags are set during the original mount and never > changed. > > In do_new_mount with the implicit setting of MNT_NODEV gone, the only > code that can affect mnt_flags is fs_fully_visible so simplify the if > statement and reduce the indentation of the code to make that clear. > > Signed-off-by: "Eric W. Biederman" This is much, much nicer. Acked-by: Seth Forshee