Commit 3a49a0f7 authored by Heiko Carstens's avatar Heiko Carstens

net/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types

In order to allow the COMPAT_SYSCALL_DEFINE macro generate code that
performs proper zero and sign extension convert all 64 bit parameters
to their corresponding 32 bit compat counterparts.
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent 8eee9093
...@@ -569,9 +569,9 @@ asmlinkage long compat_sys_sendmmsg(int fd, struct compat_mmsghdr __user *mmsg, ...@@ -569,9 +569,9 @@ asmlinkage long compat_sys_sendmmsg(int fd, struct compat_mmsghdr __user *mmsg,
unsigned vlen, unsigned int flags); unsigned vlen, unsigned int flags);
asmlinkage long compat_sys_recvmsg(int fd, struct compat_msghdr __user *msg, asmlinkage long compat_sys_recvmsg(int fd, struct compat_msghdr __user *msg,
unsigned int flags); unsigned int flags);
asmlinkage long compat_sys_recv(int fd, void __user *buf, size_t len, asmlinkage long compat_sys_recv(int fd, void __user *buf, compat_size_t len,
unsigned flags); unsigned flags);
asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, size_t len, asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, compat_size_t len,
unsigned flags, struct sockaddr __user *addr, unsigned flags, struct sockaddr __user *addr,
int __user *addrlen); int __user *addrlen);
asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg, asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg,
......
...@@ -758,14 +758,14 @@ COMPAT_SYSCALL_DEFINE3(recvmsg, int, fd, struct compat_msghdr __user *, msg, uns ...@@ -758,14 +758,14 @@ COMPAT_SYSCALL_DEFINE3(recvmsg, int, fd, struct compat_msghdr __user *, msg, uns
return __sys_recvmsg(fd, (struct msghdr __user *)msg, flags | MSG_CMSG_COMPAT); return __sys_recvmsg(fd, (struct msghdr __user *)msg, flags | MSG_CMSG_COMPAT);
} }
asmlinkage long compat_sys_recv(int fd, void __user *buf, size_t len, unsigned int flags) COMPAT_SYSCALL_DEFINE4(recv, int, fd, void __user *, buf, compat_size_t, len, unsigned int, flags)
{ {
return sys_recv(fd, buf, len, flags | MSG_CMSG_COMPAT); return sys_recv(fd, buf, len, flags | MSG_CMSG_COMPAT);
} }
asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, size_t len, COMPAT_SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, buf, compat_size_t, len,
unsigned int flags, struct sockaddr __user *addr, unsigned int, flags, struct sockaddr __user *, addr,
int __user *addrlen) int __user *, addrlen)
{ {
return sys_recvfrom(fd, buf, len, flags | MSG_CMSG_COMPAT, addr, addrlen); return sys_recvfrom(fd, buf, len, flags | MSG_CMSG_COMPAT, addr, addrlen);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment