diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-07-08 22:52:47 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-07-15 20:46:42 -0400 |
commit | 553f770ef71b27ee053bd241bef0998a15f43467 (patch) | |
tree | b23887b5e7d6ce16c9bc0627f26748e500ad5177 /ipc/util.h | |
parent | 9ba720c18622b250c0abeccbcea1b03531a92277 (diff) | |
download | linux-553f770ef71b27ee053bd241bef0998a15f43467.tar.bz2 |
ipc: move compat shmctl to native
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'ipc/util.h')
-rw-r--r-- | ipc/util.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ipc/util.h b/ipc/util.h index c692010e6f0a..3a3dfe137bee 100644 --- a/ipc/util.h +++ b/ipc/util.h @@ -191,4 +191,28 @@ int ipcget(struct ipc_namespace *ns, struct ipc_ids *ids, const struct ipc_ops *ops, struct ipc_params *params); void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids, void (*free)(struct ipc_namespace *, struct kern_ipc_perm *)); + +#ifdef CONFIG_COMPAT +#include <linux/compat.h> +struct compat_ipc_perm { + key_t key; + __compat_uid_t uid; + __compat_gid_t gid; + __compat_uid_t cuid; + __compat_gid_t cgid; + compat_mode_t mode; + unsigned short seq; +}; + +static inline int compat_ipc_parse_version(int *cmd) +{ +#ifdef CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION + int version = *cmd & IPC_64; + *cmd &= ~IPC_64; + return version; +#else + return IPC_64; +#endif +} +#endif #endif |