summaryrefslogtreecommitdiffstats
path: root/ipc/compat.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-07-09 10:34:35 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-07-15 20:46:46 -0400
commit9b1404c24a357332cb2a6df7c4337e943a4545fd (patch)
treed69d1b464c5f2ba3d4a25f1f4ab5c6ec62b03252 /ipc/compat.c
parent20bc2a3aff5a88a666e81182fd277ea2a521fd3d (diff)
downloadlinux-stable-9b1404c24a357332cb2a6df7c4337e943a4545fd.tar.gz
linux-stable-9b1404c24a357332cb2a6df7c4337e943a4545fd.tar.bz2
linux-stable-9b1404c24a357332cb2a6df7c4337e943a4545fd.zip
msgrcv(2), msgsnd(2): move compat to native
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'ipc/compat.c')
-rw-r--r--ipc/compat.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/ipc/compat.c b/ipc/compat.c
index 00c2e3beccc8..0586687c3e31 100644
--- a/ipc/compat.c
+++ b/ipc/compat.c
@@ -34,11 +34,6 @@
#include "util.h"
-struct compat_msgbuf {
- compat_long_t mtype;
- char mtext[1];
-};
-
int get_compat_ipc64_perm(struct ipc64_perm *to,
struct compat_ipc64_perm __user *from)
{
@@ -85,38 +80,6 @@ void to_compat_ipc_perm(struct compat_ipc_perm *to, struct ipc64_perm *from)
to->seq = from->seq;
}
-static long compat_do_msg_fill(void __user *dest, struct msg_msg *msg, size_t bufsz)
-{
- struct compat_msgbuf __user *msgp = dest;
- size_t msgsz;
-
- if (put_user(msg->m_type, &msgp->mtype))
- return -EFAULT;
-
- msgsz = (bufsz > msg->m_ts) ? msg->m_ts : bufsz;
- if (store_msg(msgp->mtext, msg, msgsz))
- return -EFAULT;
- return msgsz;
-}
-
-COMPAT_SYSCALL_DEFINE4(msgsnd, int, msqid, compat_uptr_t, msgp,
- compat_ssize_t, msgsz, int, msgflg)
-{
- struct compat_msgbuf __user *up = compat_ptr(msgp);
- compat_long_t mtype;
-
- if (get_user(mtype, &up->mtype))
- return -EFAULT;
- return do_msgsnd(msqid, mtype, up->mtext, (ssize_t)msgsz, msgflg);
-}
-
-COMPAT_SYSCALL_DEFINE5(msgrcv, int, msqid, compat_uptr_t, msgp,
- compat_ssize_t, msgsz, compat_long_t, msgtyp, int, msgflg)
-{
- return do_msgrcv(msqid, compat_ptr(msgp), (ssize_t)msgsz, (long)msgtyp,
- msgflg, compat_do_msg_fill);
-}
-
#ifndef COMPAT_SHMLBA
#define COMPAT_SHMLBA SHMLBA
#endif