Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 May 2015 15:44:42 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r283416 - in head/sys: amd64/linux32 compat/linux i386/linux
Message-ID:  <201505241544.t4OFiglZ063201@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Sun May 24 15:44:41 2015
New Revision: 283416
URL: https://svnweb.freebsd.org/changeset/base/283416

Log:
  x86_64 Linux do not use multiplexing on ipc system calls.
  Move struct ipc_perm definition to the MD path as it differs for 64 and
  32 bit platform.
  
  Differential Revision:	https://reviews.freebsd.org/D1068
  Reviewed by:	trasz

Modified:
  head/sys/amd64/linux32/linux.h
  head/sys/compat/linux/linux_ipc.c
  head/sys/compat/linux/linux_ipc.h
  head/sys/i386/linux/linux.h

Modified: head/sys/amd64/linux32/linux.h
==============================================================================
--- head/sys/amd64/linux32/linux.h	Sun May 24 15:43:53 2015	(r283415)
+++ head/sys/amd64/linux32/linux.h	Sun May 24 15:44:41 2015	(r283416)
@@ -573,6 +573,16 @@ union l_semun {
 	l_uintptr_t	__pad;
 } __packed;
 
+struct l_ipc_perm {
+	l_key_t		key;
+	l_uid16_t	uid;
+	l_gid16_t	gid;
+	l_uid16_t	cuid;
+	l_gid16_t	cgid;
+	l_ushort	mode;
+	l_ushort	seq;
+};
+
 /*
  * Socket defines
  */

Modified: head/sys/compat/linux/linux_ipc.c
==============================================================================
--- head/sys/compat/linux/linux_ipc.c	Sun May 24 15:43:53 2015	(r283415)
+++ head/sys/compat/linux/linux_ipc.c	Sun May 24 15:44:41 2015	(r283416)
@@ -117,16 +117,6 @@ bsd_to_linux_shm_info( struct shm_info *
 	lpp->swap_successes = bpp->swap_successes ;
 }
 
-struct l_ipc_perm {
-	l_key_t		key;
-	l_uid16_t	uid;
-	l_gid16_t	gid;
-	l_uid16_t	cuid;
-	l_gid16_t	cgid;
-	l_ushort	mode;
-	l_ushort	seq;
-};
-
 static void
 linux_to_bsd_ipc_perm(struct l_ipc_perm *lpp, struct ipc_perm *bpp)
 {

Modified: head/sys/compat/linux/linux_ipc.h
==============================================================================
--- head/sys/compat/linux/linux_ipc.h	Sun May 24 15:43:53 2015	(r283415)
+++ head/sys/compat/linux/linux_ipc.h	Sun May 24 15:44:41 2015	(r283416)
@@ -82,7 +82,7 @@
 #define	LINUX_IPC_64	0x0100	/* New version (support 32-bit UIDs, bigger
 				   message sizes, etc. */
 
-#if defined(__i386__) || defined(__amd64__)
+#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
 
 struct linux_msgctl_args 
 {
@@ -177,6 +177,6 @@ int linux_shmctl(struct thread *, struct
 int linux_shmdt(struct thread *, struct linux_shmdt_args *);
 int linux_shmget(struct thread *, struct linux_shmget_args *);
 
-#endif	/* __i386__ || __amd64__ */
+#endif	/* __i386__ || (__amd64__ && COMPAT_LINUX32) */
 
 #endif /* _LINUX_IPC_H_ */

Modified: head/sys/i386/linux/linux.h
==============================================================================
--- head/sys/i386/linux/linux.h	Sun May 24 15:43:53 2015	(r283415)
+++ head/sys/i386/linux/linux.h	Sun May 24 15:44:41 2015	(r283416)
@@ -550,6 +550,16 @@ union l_semun {
 	void		*__pad;
 };
 
+struct l_ipc_perm {
+	l_key_t		key;
+	l_uid16_t	uid;
+	l_gid16_t	gid;
+	l_uid16_t	cuid;
+	l_gid16_t	cgid;
+	l_ushort	mode;
+	l_ushort	seq;
+};
+
 /*
  * Socket defines
  */



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