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

[CVE-2009-0029] System call wrappers part 22

Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent 20f37034
...@@ -1214,7 +1214,7 @@ int sock_create_kern(int family, int type, int protocol, struct socket **res) ...@@ -1214,7 +1214,7 @@ int sock_create_kern(int family, int type, int protocol, struct socket **res)
return __sock_create(&init_net, family, type, protocol, res, 1); return __sock_create(&init_net, family, type, protocol, res, 1);
} }
asmlinkage long sys_socket(int family, int type, int protocol) SYSCALL_DEFINE3(socket, int, family, int, type, int, protocol)
{ {
int retval; int retval;
struct socket *sock; struct socket *sock;
...@@ -1255,8 +1255,8 @@ out_release: ...@@ -1255,8 +1255,8 @@ out_release:
* Create a pair of connected sockets. * Create a pair of connected sockets.
*/ */
asmlinkage long sys_socketpair(int family, int type, int protocol, SYSCALL_DEFINE4(socketpair, int, family, int, type, int, protocol,
int __user *usockvec) int __user *, usockvec)
{ {
struct socket *sock1, *sock2; struct socket *sock1, *sock2;
int fd1, fd2, err; int fd1, fd2, err;
...@@ -1385,7 +1385,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen) ...@@ -1385,7 +1385,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
* ready for listening. * ready for listening.
*/ */
asmlinkage long sys_listen(int fd, int backlog) SYSCALL_DEFINE2(listen, int, fd, int, backlog)
{ {
struct socket *sock; struct socket *sock;
int err, fput_needed; int err, fput_needed;
...@@ -1615,9 +1615,9 @@ SYSCALL_DEFINE3(getpeername, int, fd, struct sockaddr __user *, usockaddr, ...@@ -1615,9 +1615,9 @@ SYSCALL_DEFINE3(getpeername, int, fd, struct sockaddr __user *, usockaddr,
* the protocol. * the protocol.
*/ */
asmlinkage long sys_sendto(int fd, void __user *buff, size_t len, SYSCALL_DEFINE6(sendto, int, fd, void __user *, buff, size_t, len,
unsigned flags, struct sockaddr __user *addr, unsigned, flags, struct sockaddr __user *, addr,
int addr_len) int, addr_len)
{ {
struct socket *sock; struct socket *sock;
struct sockaddr_storage address; struct sockaddr_storage address;
...@@ -1660,7 +1660,8 @@ out: ...@@ -1660,7 +1660,8 @@ out:
* Send a datagram down a socket. * Send a datagram down a socket.
*/ */
asmlinkage long sys_send(int fd, void __user *buff, size_t len, unsigned flags) SYSCALL_DEFINE4(send, int, fd, void __user *, buff, size_t, len,
unsigned, flags)
{ {
return sys_sendto(fd, buff, len, flags, NULL, 0); return sys_sendto(fd, buff, len, flags, NULL, 0);
} }
...@@ -1671,9 +1672,9 @@ asmlinkage long sys_send(int fd, void __user *buff, size_t len, unsigned flags) ...@@ -1671,9 +1672,9 @@ asmlinkage long sys_send(int fd, void __user *buff, size_t len, unsigned flags)
* sender address from kernel to user space. * sender address from kernel to user space.
*/ */
asmlinkage long sys_recvfrom(int fd, void __user *ubuf, size_t size, SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
unsigned flags, struct sockaddr __user *addr, unsigned, flags, struct sockaddr __user *, addr,
int __user *addr_len) int __user *, addr_len)
{ {
struct socket *sock; struct socket *sock;
struct iovec iov; struct iovec iov;
...@@ -1815,7 +1816,7 @@ SYSCALL_DEFINE2(shutdown, int, fd, int, how) ...@@ -1815,7 +1816,7 @@ SYSCALL_DEFINE2(shutdown, int, fd, int, how)
* BSD sendmsg interface * BSD sendmsg interface
*/ */
asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags) SYSCALL_DEFINE3(sendmsg, int, fd, struct msghdr __user *, msg, unsigned, flags)
{ {
struct compat_msghdr __user *msg_compat = struct compat_msghdr __user *msg_compat =
(struct compat_msghdr __user *)msg; (struct compat_msghdr __user *)msg;
...@@ -1921,8 +1922,8 @@ out: ...@@ -1921,8 +1922,8 @@ out:
* BSD recvmsg interface * BSD recvmsg interface
*/ */
asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, SYSCALL_DEFINE3(recvmsg, int, fd, struct msghdr __user *, msg,
unsigned int flags) unsigned int, flags)
{ {
struct compat_msghdr __user *msg_compat = struct compat_msghdr __user *msg_compat =
(struct compat_msghdr __user *)msg; (struct compat_msghdr __user *)msg;
...@@ -2045,7 +2046,7 @@ static const unsigned char nargs[19]={ ...@@ -2045,7 +2046,7 @@ static const unsigned char nargs[19]={
* it is set by the callees. * it is set by the callees.
*/ */
asmlinkage long sys_socketcall(int call, unsigned long __user *args) SYSCALL_DEFINE2(socketcall, int, call, unsigned long __user *, args)
{ {
unsigned long a[6]; unsigned long a[6];
unsigned long a0, a1; unsigned long a0, a1;
......
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