lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090204234905.GB17354@us.ibm.com>
Date:	Wed, 4 Feb 2009 17:49:05 -0600
From:	"Serge E. Hallyn" <serue@...ibm.com>
To:	Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
Cc:	Alan Cox <alan@...rguk.ukuu.org.uk>, hpa@...or.com, hch@....de,
	sukadev@...ibm.com, Containers <containers@...ts.osdl.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [v2][PATCH 1/5] Unroll essentials of do_remount_sb() into
	devpts

Quoting Sukadev Bhattiprolu (sukadev@...ux.vnet.ibm.com):
> 
> From: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
> Date: Tue, 27 Jan 2009 22:58:18 -0800
> Subject: [v2][PATCH 1/5] Unroll essentials of do_remount_sb() into devpts
> 
> On remount, devpts fs only needs to parse the mount options. Users cannot
> directly create/dirty files in /dev/pts so the MS_RDONLY flag and
> shrinking the dcache does not really apply to devpts.
> 
> So effectively on remount, devpts only parses the mount options and updates
> these options in its super block. As such, we could replace do_remount_sb()
> call with a direct parse_mount_options().
> 
> Doing so enables subsequent patches to avoid parsing the mount options twice
> and simplify the code.

You've dropped the update_ptmx_mode() which you used to do
inside devpts_remount().  Is that also on purpose?

> Signed-off-by: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
> ---
>  fs/devpts/inode.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
> index ad186b4..de15e73 100644
> --- a/fs/devpts/inode.c
> +++ b/fs/devpts/inode.c
> @@ -442,6 +442,8 @@ static int get_init_pts_sb(struct file_system_type *fs_type, int flags,
>  		void *data, struct vfsmount *mnt)
>  {
>  	struct super_block *s;
> +	struct pts_mount_opts *opts;
> +	struct pts_fs_info *fsi;
>  	int error;
> 
>  	s = sget(fs_type, compare_init_pts_sb, set_anon_super, NULL);
> @@ -458,7 +460,10 @@ static int get_init_pts_sb(struct file_system_type *fs_type, int flags,
>  		}
>  		s->s_flags |= MS_ACTIVE;
>  	}
> -	do_remount_sb(s, flags, data, 0);
> +	fsi = DEVPTS_SB(s);
> +	opts = &fsi->mount_opts;
> +	parse_mount_options(data, PARSE_REMOUNT, opts);
> +
>  	simple_set_mnt(mnt, s);
>  	return 0;
>  }
> -- 
> 1.5.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ