diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-01-21 11:16:48 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2019-01-25 13:34:31 +0100 |
commit | 1c4a47333c169412bad5c7f909909261b8dc7cbf (patch) | |
tree | 52d1f89bd8c92bdcf67bc5b06ccee752b673c414 | |
parent | 472f8179b8e64c001f9e2539417a313325e1d7dc (diff) |
ipc: rework bits/ipc.h
The 'generic' header assumes that we want to pass IPC_64=0x100,
which is only true on old architectures. The generic kernel
interface does not take IPC_64, so change the generic header
accordingly, and change the headers for the exceptions.
Specifically:
- arm32, microblaze, mips64, mipsn32, mlpha and xtensa require
passing IPC_64 in both msgctl/semctl/shmctl and ipc().
- mipso32, powerpc, i386, m68k, s390 and sparc require passing
IPC_64 for ipc(), but not for msgctl/semctl/shmctl.
- everything else does not pass IPC_64.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | arch/arm/bits/ipc.h (renamed from arch/or1k/bits/ipc.h) | 2 | ||||
-rw-r--r-- | arch/generic/bits/ipc.h | 2 | ||||
-rw-r--r-- | arch/m68k/bits/ipc.h | 17 | ||||
-rw-r--r-- | arch/microblaze/bits/ipc.h (renamed from arch/x86_64/bits/ipc.h) | 2 | ||||
-rw-r--r-- | arch/mips/bits/ipc.h (renamed from arch/aarch64/bits/ipc.h) | 9 | ||||
-rw-r--r-- | arch/mipsn32/bits/ipc.h | 13 | ||||
-rw-r--r-- | arch/powerpc/bits/ipc.h | 6 | ||||
-rw-r--r-- | arch/s390x/bits/ipc.h | 11 | ||||
-rw-r--r-- | arch/sh/bits/ipc.h | 17 |
9 files changed, 66 insertions, 13 deletions
diff --git a/arch/or1k/bits/ipc.h b/arch/arm/bits/ipc.h index 3d894e30..779c42fd 100644 --- a/arch/or1k/bits/ipc.h +++ b/arch/arm/bits/ipc.h @@ -10,4 +10,4 @@ struct ipc_perm { long __pad2; }; -#define IPC_64 0 +#define IPC_64 0x100 diff --git a/arch/generic/bits/ipc.h b/arch/generic/bits/ipc.h index 779c42fd..3d894e30 100644 --- a/arch/generic/bits/ipc.h +++ b/arch/generic/bits/ipc.h @@ -10,4 +10,4 @@ struct ipc_perm { long __pad2; }; -#define IPC_64 0x100 +#define IPC_64 0 diff --git a/arch/m68k/bits/ipc.h b/arch/m68k/bits/ipc.h new file mode 100644 index 00000000..a7017f5c --- /dev/null +++ b/arch/m68k/bits/ipc.h @@ -0,0 +1,17 @@ +struct ipc_perm { + key_t __ipc_perm_key; + uid_t uid; + gid_t gid; + uid_t cuid; + gid_t cgid; + mode_t mode; + int __ipc_perm_seq; + long __pad1; + long __pad2; +}; + +/* ipc() wants IPC_64, direct msgctl() doesn't */ +#ifdef __USE_TIME_BITS64 +#define IPC_64 0 +#else +#define IPC_64 0x100 diff --git a/arch/x86_64/bits/ipc.h b/arch/microblaze/bits/ipc.h index 3d894e30..779c42fd 100644 --- a/arch/x86_64/bits/ipc.h +++ b/arch/microblaze/bits/ipc.h @@ -10,4 +10,4 @@ struct ipc_perm { long __pad2; }; -#define IPC_64 0 +#define IPC_64 0x100 diff --git a/arch/aarch64/bits/ipc.h b/arch/mips/bits/ipc.h index 6f3328a8..779c42fd 100644 --- a/arch/aarch64/bits/ipc.h +++ b/arch/mips/bits/ipc.h @@ -5,10 +5,9 @@ struct ipc_perm { uid_t cuid; gid_t cgid; mode_t mode; - unsigned short __ipc_perm_seq; - - unsigned long __pad1; - unsigned long __pad2; + int __ipc_perm_seq; + long __pad1; + long __pad2; }; -#define IPC_64 0 +#define IPC_64 0x100 diff --git a/arch/mipsn32/bits/ipc.h b/arch/mipsn32/bits/ipc.h new file mode 100644 index 00000000..779c42fd --- /dev/null +++ b/arch/mipsn32/bits/ipc.h @@ -0,0 +1,13 @@ +struct ipc_perm { + key_t __ipc_perm_key; + uid_t uid; + gid_t gid; + uid_t cuid; + gid_t cgid; + mode_t mode; + int __ipc_perm_seq; + long __pad1; + long __pad2; +}; + +#define IPC_64 0x100 diff --git a/arch/powerpc/bits/ipc.h b/arch/powerpc/bits/ipc.h index 3f2ede07..6976dfad 100644 --- a/arch/powerpc/bits/ipc.h +++ b/arch/powerpc/bits/ipc.h @@ -11,5 +11,9 @@ struct ipc_perm { long long __pad3; }; +/* ipc() wants IPC_64, direct msgctl() doesn't */ +#ifdef __USE_TIME_BITS64 +#define IPC_64 0 +#else #define IPC_64 0x100 - +#endif diff --git a/arch/s390x/bits/ipc.h b/arch/s390x/bits/ipc.h index 4710c12b..a7017f5c 100644 --- a/arch/s390x/bits/ipc.h +++ b/arch/s390x/bits/ipc.h @@ -5,10 +5,13 @@ struct ipc_perm { uid_t cuid; gid_t cgid; mode_t mode; - unsigned short __pad1; - unsigned short __ipc_perm_seq; - unsigned long __pad2; - unsigned long __pad3; + int __ipc_perm_seq; + long __pad1; + long __pad2; }; +/* ipc() wants IPC_64, direct msgctl() doesn't */ +#ifdef __USE_TIME_BITS64 +#define IPC_64 0 +#else #define IPC_64 0x100 diff --git a/arch/sh/bits/ipc.h b/arch/sh/bits/ipc.h new file mode 100644 index 00000000..a7017f5c --- /dev/null +++ b/arch/sh/bits/ipc.h @@ -0,0 +1,17 @@ +struct ipc_perm { + key_t __ipc_perm_key; + uid_t uid; + gid_t gid; + uid_t cuid; + gid_t cgid; + mode_t mode; + int __ipc_perm_seq; + long __pad1; + long __pad2; +}; + +/* ipc() wants IPC_64, direct msgctl() doesn't */ +#ifdef __USE_TIME_BITS64 +#define IPC_64 0 +#else +#define IPC_64 0x100 |