summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2016-01-09 15:56:01 +0000
committerdchagin <dchagin@FreeBSD.org>2016-01-09 15:56:01 +0000
commit793bb9c3f7dceaf4b3fb1c260154dc2fe82a9170 (patch)
treeb32f34b77015e08314af9927258764e9c084f24e
parent0a1120ef093d9730dc72cdda6f4ff89d8c577d0f (diff)
downloadFreeBSD-src-793bb9c3f7dceaf4b3fb1c260154dc2fe82a9170.zip
FreeBSD-src-793bb9c3f7dceaf4b3fb1c260154dc2fe82a9170.tar.gz
MFC r283416:
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.
-rw-r--r--sys/amd64/linux32/linux.h10
-rw-r--r--sys/compat/linux/linux_ipc.c10
-rw-r--r--sys/compat/linux/linux_ipc.h4
-rw-r--r--sys/i386/linux/linux.h10
4 files changed, 22 insertions, 12 deletions
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h
index 28fcdd5..5fcf8df 100644
--- a/sys/amd64/linux32/linux.h
+++ b/sys/amd64/linux32/linux.h
@@ -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
*/
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c
index 1237edc..7a92c6a 100644
--- a/sys/compat/linux/linux_ipc.c
+++ b/sys/compat/linux/linux_ipc.c
@@ -117,16 +117,6 @@ bsd_to_linux_shm_info( struct shm_info *bpp, struct l_shm_info *lpp)
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)
{
diff --git a/sys/compat/linux/linux_ipc.h b/sys/compat/linux/linux_ipc.h
index f1531ba..8e9c050 100644
--- a/sys/compat/linux/linux_ipc.h
+++ b/sys/compat/linux/linux_ipc.h
@@ -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 linux_shmctl_args *);
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_ */
diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h
index 8b168c4..e0b6866 100644
--- a/sys/i386/linux/linux.h
+++ b/sys/i386/linux/linux.h
@@ -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
*/
OpenPOWER on IntegriCloud