summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-03-04 11:09:57 -0500
committerHeiko Carstens <heiko.carstens@de.ibm.com>2014-03-06 10:30:45 -0500
commit3a49a0f7181c243aa04e6c5e44ca70a90ead8f9a (patch)
tree9b4609fddab00f06e9ebdb206f91c66961e38e66
parent8eee9093cdbeb2aa89d67dc1a3fd118acabaea52 (diff)
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: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r--include/linux/compat.h4
-rw-r--r--net/compat.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index f670e591aff8..8e636211f334 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -569,9 +569,9 @@ asmlinkage long compat_sys_sendmmsg(int fd, struct compat_mmsghdr __user *mmsg,
569 unsigned vlen, unsigned int flags); 569 unsigned vlen, unsigned int flags);
570asmlinkage long compat_sys_recvmsg(int fd, struct compat_msghdr __user *msg, 570asmlinkage long compat_sys_recvmsg(int fd, struct compat_msghdr __user *msg,
571 unsigned int flags); 571 unsigned int flags);
572asmlinkage long compat_sys_recv(int fd, void __user *buf, size_t len, 572asmlinkage long compat_sys_recv(int fd, void __user *buf, compat_size_t len,
573 unsigned flags); 573 unsigned flags);
574asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, size_t len, 574asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, compat_size_t len,
575 unsigned flags, struct sockaddr __user *addr, 575 unsigned flags, struct sockaddr __user *addr,
576 int __user *addrlen); 576 int __user *addrlen);
577asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg, 577asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg,
diff --git a/net/compat.c b/net/compat.c
index 706b78be9a23..9a76eaf63184 100644
--- a/net/compat.c
+++ b/net/compat.c
@@ -758,14 +758,14 @@ COMPAT_SYSCALL_DEFINE3(recvmsg, int, fd, struct compat_msghdr __user *, msg, uns
758 return __sys_recvmsg(fd, (struct msghdr __user *)msg, flags | MSG_CMSG_COMPAT); 758 return __sys_recvmsg(fd, (struct msghdr __user *)msg, flags | MSG_CMSG_COMPAT);
759} 759}
760 760
761asmlinkage long compat_sys_recv(int fd, void __user *buf, size_t len, unsigned int flags) 761COMPAT_SYSCALL_DEFINE4(recv, int, fd, void __user *, buf, compat_size_t, len, unsigned int, flags)
762{ 762{
763 return sys_recv(fd, buf, len, flags | MSG_CMSG_COMPAT); 763 return sys_recv(fd, buf, len, flags | MSG_CMSG_COMPAT);
764} 764}
765 765
766asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, size_t len, 766COMPAT_SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, buf, compat_size_t, len,
767 unsigned int flags, struct sockaddr __user *addr, 767 unsigned int, flags, struct sockaddr __user *, addr,
768 int __user *addrlen) 768 int __user *, addrlen)
769{ 769{
770 return sys_recvfrom(fd, buf, len, flags | MSG_CMSG_COMPAT, addr, addrlen); 770 return sys_recvfrom(fd, buf, len, flags | MSG_CMSG_COMPAT, addr, addrlen);
771} 771}