Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Oct 2010 15:44:49 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r214420 - in stable/8/sys: fs/cd9660 fs/hpfs fs/msdosfs fs/ntfs gnu/fs/reiserfs kern sys ufs/ffs ufs/ufs
Message-ID:  <201010271544.o9RFin4X012592@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed Oct 27 15:44:49 2010
New Revision: 214420
URL: http://svn.freebsd.org/changeset/base/214420

Log:
  MFC r213664:
  The r184588 changed the layout of struct export_args, causing an ABI
  breakage for old mount(2) syscall, since most struct <filesystem>_args
  embed export_args. The mount(2) is supposed to provide ABI
  compatibility for pre-nmount mount(8) binaries, so restore ABI to
  pre-r184588.

Modified:
  stable/8/sys/fs/cd9660/cd9660_mount.h
  stable/8/sys/fs/cd9660/cd9660_vfsops.c
  stable/8/sys/fs/hpfs/hpfs_vfsops.c
  stable/8/sys/fs/hpfs/hpfsmount.h
  stable/8/sys/fs/msdosfs/msdosfs_vfsops.c
  stable/8/sys/fs/msdosfs/msdosfsmount.h
  stable/8/sys/fs/ntfs/ntfs_vfsops.c
  stable/8/sys/fs/ntfs/ntfsmount.h
  stable/8/sys/gnu/fs/reiserfs/reiserfs_mount.h
  stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
  stable/8/sys/kern/vfs_mount.c
  stable/8/sys/sys/mount.h
  stable/8/sys/ufs/ffs/ffs_vfsops.c
  stable/8/sys/ufs/ufs/ufsmount.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/cd9660/cd9660_mount.h
==============================================================================
--- stable/8/sys/fs/cd9660/cd9660_mount.h	Wed Oct 27 14:11:11 2010	(r214419)
+++ stable/8/sys/fs/cd9660/cd9660_mount.h	Wed Oct 27 15:44:49 2010	(r214420)
@@ -40,7 +40,7 @@
  */
 struct iso_args {
 	char	*fspec;			/* block special device to mount */
-	struct	export_args export;	/* network export info */
+	struct	oexport_args export;	/* network export info */
 	int	flags;			/* mounting flags, see below */
 	int	ssector;		/* starting sector, 0 for 1st session */
 	char	*cs_disk;		/* disk charset for Joliet cs conversion */

Modified: stable/8/sys/fs/cd9660/cd9660_vfsops.c
==============================================================================
--- stable/8/sys/fs/cd9660/cd9660_vfsops.c	Wed Oct 27 14:11:11 2010	(r214419)
+++ stable/8/sys/fs/cd9660/cd9660_vfsops.c	Wed Oct 27 15:44:49 2010	(r214420)
@@ -98,14 +98,16 @@ static int
 cd9660_cmount(struct mntarg *ma, void *data, int flags)
 {
 	struct iso_args args;
+	struct export_args exp;
 	int error;
 
 	error = copyin(data, &args, sizeof args);
 	if (error)
 		return (error);
+	vfs_oexport_conv(&args.export, &exp);
 
 	ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN);
-	ma = mount_arg(ma, "export", &args.export, sizeof args.export);
+	ma = mount_arg(ma, "export", &exp, sizeof(exp));
 	ma = mount_argsu(ma, "cs_disk", args.cs_disk, 64);
 	ma = mount_argsu(ma, "cs_local", args.cs_local, 64);
 	ma = mount_argf(ma, "ssector", "%u", args.ssector);

Modified: stable/8/sys/fs/hpfs/hpfs_vfsops.c
==============================================================================
--- stable/8/sys/fs/hpfs/hpfs_vfsops.c	Wed Oct 27 14:11:11 2010	(r214419)
+++ stable/8/sys/fs/hpfs/hpfs_vfsops.c	Wed Oct 27 15:44:49 2010	(r214420)
@@ -76,14 +76,16 @@ hpfs_cmount ( 
 	int flags)
 {
 	struct hpfs_args args;
+	struct export_args exp;
 	int error;
 
 	error = copyin(data, (caddr_t)&args, sizeof (struct hpfs_args));
 	if (error)
 		return (error);
+	vfs_oexport_conv(&args.export, &exp);
 
 	ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN);
-	ma = mount_arg(ma, "export", &args.export, sizeof args.export);
+	ma = mount_arg(ma, "export", &exp, sizeof(exp));
 	ma = mount_argf(ma, "uid", "%d", args.uid);
 	ma = mount_argf(ma, "gid", "%d", args.gid);
 	ma = mount_argf(ma, "mode", "%d", args.mode);

Modified: stable/8/sys/fs/hpfs/hpfsmount.h
==============================================================================
--- stable/8/sys/fs/hpfs/hpfsmount.h	Wed Oct 27 14:11:11 2010	(r214419)
+++ stable/8/sys/fs/hpfs/hpfsmount.h	Wed Oct 27 15:44:49 2010	(r214420)
@@ -29,7 +29,7 @@
 #define HPFSMNT_TABLES		0x0001
 struct hpfs_args {
 	char	*fspec;			/* block special device to mount */
-	struct	export_args export;	/* network export information */
+	struct	oexport_args export;	/* network export information */
 	uid_t	uid;			/* uid that owns hpfs files */
 	gid_t	gid;			/* gid that owns hpfs files */
 	mode_t	mode;			/* mask to be applied for hpfs perms */

Modified: stable/8/sys/fs/msdosfs/msdosfs_vfsops.c
==============================================================================
--- stable/8/sys/fs/msdosfs/msdosfs_vfsops.c	Wed Oct 27 14:11:11 2010	(r214419)
+++ stable/8/sys/fs/msdosfs/msdosfs_vfsops.c	Wed Oct 27 15:44:49 2010	(r214420)
@@ -200,6 +200,7 @@ static int
 msdosfs_cmount(struct mntarg *ma, void *data, int flags)
 {
 	struct msdosfs_args args;
+	struct export_args exp;
 	int error;
 
 	if (data == NULL)
@@ -207,9 +208,10 @@ msdosfs_cmount(struct mntarg *ma, void *
 	error = copyin(data, &args, sizeof args);
 	if (error)
 		return (error);
+	vfs_oexport_conv(&args.export, &exp);
 
 	ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN);
-	ma = mount_arg(ma, "export", &args.export, sizeof args.export);
+	ma = mount_arg(ma, "export", &exp, sizeof(exp));
 	ma = mount_argf(ma, "uid", "%d", args.uid);
 	ma = mount_argf(ma, "gid", "%d", args.gid);
 	ma = mount_argf(ma, "mask", "%d", args.mask);

Modified: stable/8/sys/fs/msdosfs/msdosfsmount.h
==============================================================================
--- stable/8/sys/fs/msdosfs/msdosfsmount.h	Wed Oct 27 14:11:11 2010	(r214419)
+++ stable/8/sys/fs/msdosfs/msdosfsmount.h	Wed Oct 27 15:44:49 2010	(r214420)
@@ -234,7 +234,7 @@ uint32_t msdosfs_fileno_map(struct mount
  */
 struct msdosfs_args {
 	char	*fspec;		/* blocks special holding the fs to mount */
-	struct	export_args export;	/* network export information */
+	struct	oexport_args export;	/* network export information */
 	uid_t	uid;		/* uid that owns msdosfs files */
 	gid_t	gid;		/* gid that owns msdosfs files */
 	mode_t	mask;		/* file mask to be applied for msdosfs perms */

Modified: stable/8/sys/fs/ntfs/ntfs_vfsops.c
==============================================================================
--- stable/8/sys/fs/ntfs/ntfs_vfsops.c	Wed Oct 27 14:11:11 2010	(r214419)
+++ stable/8/sys/fs/ntfs/ntfs_vfsops.c	Wed Oct 27 15:44:49 2010	(r214420)
@@ -119,14 +119,16 @@ ntfs_cmount ( 
 	void *data,
 	int flags)
 {
-	int error;
 	struct ntfs_args args;
+	struct export_args exp;
+	int error;
 
-	error = copyin(data, (caddr_t)&args, sizeof args);
+	error = copyin(data, &args, sizeof(args));
 	if (error)
 		return (error);
+	vfs_oexport_conv(&args.export, &exp);
 	ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN);
-	ma = mount_arg(ma, "export", &args.export, sizeof args.export);
+	ma = mount_arg(ma, "export", &exp, sizeof(exp));
 	ma = mount_argf(ma, "uid", "%d", args.uid);
 	ma = mount_argf(ma, "gid", "%d", args.gid);
 	ma = mount_argf(ma, "mode", "%d", args.mode);

Modified: stable/8/sys/fs/ntfs/ntfsmount.h
==============================================================================
--- stable/8/sys/fs/ntfs/ntfsmount.h	Wed Oct 27 14:11:11 2010	(r214419)
+++ stable/8/sys/fs/ntfs/ntfsmount.h	Wed Oct 27 15:44:49 2010	(r214420)
@@ -34,7 +34,7 @@
 
 struct ntfs_args {
 	char	*fspec;			/* block special device to mount */
-	struct	export_args export;	/* network export information */
+	struct	oexport_args export;	/* network export information */
 	uid_t	uid;			/* uid that owns ntfs files */
 	gid_t	gid;			/* gid that owns ntfs files */
 	mode_t	mode;			/* mask to be applied for ntfs perms */

Modified: stable/8/sys/gnu/fs/reiserfs/reiserfs_mount.h
==============================================================================
--- stable/8/sys/gnu/fs/reiserfs/reiserfs_mount.h	Wed Oct 27 14:11:11 2010	(r214419)
+++ stable/8/sys/gnu/fs/reiserfs/reiserfs_mount.h	Wed Oct 27 15:44:49 2010	(r214420)
@@ -39,7 +39,7 @@ struct reiserfs_mount {
 /* Arguments to mount ReiserFS filesystems. */
 struct reiserfs_args {
 	char	*fspec;		/* blocks special holding the fs to mount */
-	struct export_args export;	/* network export information */
+	struct oexport_args export;	/* network export information */
 };
 
 #endif /* !defined _GNU_REISERFS_REISERFS_MOUNT_H */

Modified: stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
==============================================================================
--- stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c	Wed Oct 27 14:11:11 2010	(r214419)
+++ stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c	Wed Oct 27 15:44:49 2010	(r214420)
@@ -52,14 +52,16 @@ static int
 reiserfs_cmount(struct mntarg *ma, void *data, int flags)
 {
 	struct reiserfs_args args;
+	struct export_args exp;
 	int error;
 
 	error = copyin(data, &args, sizeof(args));
 	if (error)
 		return (error);
+	vfs_oexport_conv(&args.export, &exp);
 
 	ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN);
-	ma = mount_arg(ma, "export", &args.export, sizeof args.export);
+	ma = mount_arg(ma, "export", &exp, sizeof(exp));
 
 	error = kernel_mount(ma, flags);
 

Modified: stable/8/sys/kern/vfs_mount.c
==============================================================================
--- stable/8/sys/kern/vfs_mount.c	Wed Oct 27 14:11:11 2010	(r214419)
+++ stable/8/sys/kern/vfs_mount.c	Wed Oct 27 15:44:49 2010	(r214420)
@@ -2501,3 +2501,11 @@ kernel_vmount(int flags, ...)
 	error = kernel_mount(ma, flags);
 	return (error);
 }
+
+void
+vfs_oexport_conv(const struct oexport_args *oexp, struct export_args *exp)
+{
+
+	bcopy(oexp, exp, sizeof(*oexp));
+	exp->ex_numsecflavors = 0;
+}

Modified: stable/8/sys/sys/mount.h
==============================================================================
--- stable/8/sys/sys/mount.h	Wed Oct 27 14:11:11 2010	(r214419)
+++ stable/8/sys/sys/mount.h	Wed Oct 27 15:44:49 2010	(r214420)
@@ -738,6 +738,8 @@ int	vfs_modevent(module_t, int, void *);
 void	vfs_mount_error(struct mount *, const char *, ...);
 void	vfs_mountroot(void);			/* mount our root filesystem */
 void	vfs_mountedfrom(struct mount *, const char *from);
+void	vfs_oexport_conv(const struct oexport_args *oexp,
+	    struct export_args *exp);
 void	vfs_ref(struct mount *);
 void	vfs_rel(struct mount *);
 struct mount *vfs_mount_alloc(struct vnode *, struct vfsconf *, const char *,

Modified: stable/8/sys/ufs/ffs/ffs_vfsops.c
==============================================================================
--- stable/8/sys/ufs/ffs/ffs_vfsops.c	Wed Oct 27 14:11:11 2010	(r214419)
+++ stable/8/sys/ufs/ffs/ffs_vfsops.c	Wed Oct 27 15:44:49 2010	(r214420)
@@ -460,6 +460,7 @@ static int
 ffs_cmount(struct mntarg *ma, void *data, int flags)
 {
 	struct ufs_args args;
+	struct export_args exp;
 	int error;
 
 	if (data == NULL)
@@ -467,9 +468,10 @@ ffs_cmount(struct mntarg *ma, void *data
 	error = copyin(data, &args, sizeof args);
 	if (error)
 		return (error);
+	vfs_oexport_conv(&args.export, &exp);
 
 	ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN);
-	ma = mount_arg(ma, "export", &args.export, sizeof args.export);
+	ma = mount_arg(ma, "export", &exp, sizeof(exp));
 	error = kernel_mount(ma, flags);
 
 	return (error);

Modified: stable/8/sys/ufs/ufs/ufsmount.h
==============================================================================
--- stable/8/sys/ufs/ufs/ufsmount.h	Wed Oct 27 14:11:11 2010	(r214419)
+++ stable/8/sys/ufs/ufs/ufsmount.h	Wed Oct 27 15:44:49 2010	(r214420)
@@ -40,7 +40,7 @@
  */
 struct ufs_args {
 	char	*fspec;			/* block special device to mount */
-	struct	export_args export;	/* network export information */
+	struct	oexport_args export;	/* network export information */
 };
 
 #ifdef _KERNEL



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010271544.o9RFin4X012592>