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]
Date:	Wed, 4 Feb 2009 18:10:10 -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 2/5] Parse mount options just once and copy them to
	super block

Quoting Sukadev Bhattiprolu (sukadev@...ux.vnet.ibm.com):
> 
> From: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
> Date: Tue, 27 Jan 2009 23:15:47 -0800
> Subject: [v2][PATCH 2/5] Parse mount options just once and copy them to super block
> 
> Since all the mount option parsing is done in devpts, we could do it
> just once and pass it around in devpts functions and eventually store
> it in the super block.
> ---
>  fs/devpts/inode.c |  100 ++++++++++++-----------------------------------------
>  1 files changed, 22 insertions(+), 78 deletions(-)

Nice ratio of - to +....

> @@ -495,17 +434,22 @@ static int init_pts_mount(struct file_system_type *fs_type, int flags,
>  static int devpts_get_sb(struct file_system_type *fs_type,
>  	int flags, const char *dev_name, void *data, struct vfsmount *mnt)
>  {
> -	int new;
> -
> -	new = is_new_instance_mount(data);
> -	if (new < 0)
> -		return new;
> +	int error;
> +	struct pts_mount_opts opts;
> 
> -	if (new)
> -		return new_pts_mount(fs_type, flags, data, mnt);
> +	memset(&opts, 0, sizeof(opts)); 
> +	if (data) {
> +		error = parse_mount_options(data, PARSE_MOUNT, &opts);

Is there any reason to keep the PARSE_MOUNT argument to
parse_mount_options?

> +		if (error)
> +			return error;
> +	}
> 
> -	return init_pts_mount(fs_type, flags, data, mnt);
> +	if (opts.newinstance)
> +		return new_pts_mount(fs_type, flags, data, &opts, mnt);
> +	else
> +		return init_pts_mount(fs_type, flags, data, &opts, mnt);
>  }
> +
>  #else
>  /*
>   * This supports only the legacy single-instance semantics (no
> -- 
> 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