diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:14:24 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:15:27 -0500 |
commit | 3e0fa65f8ba4fd24b3dcfaf14d5b15eaab0fdc61 (patch) | |
tree | 1dbfc51d98988dcfba9f55ca6e0ada4e8af50f7c /net | |
parent | 20f37034fb966a1c35894f9fe529fda0b6440101 (diff) |
[CVE-2009-0029] System call wrappers part 22
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/socket.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/net/socket.c b/net/socket.c index fdd72c586a1a..35dd7371752a 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -1214,7 +1214,7 @@ int sock_create_kern(int family, int type, int protocol, struct socket **res) | |||
1214 | return __sock_create(&init_net, family, type, protocol, res, 1); | 1214 | return __sock_create(&init_net, family, type, protocol, res, 1); |
1215 | } | 1215 | } |
1216 | 1216 | ||
1217 | asmlinkage long sys_socket(int family, int type, int protocol) | 1217 | SYSCALL_DEFINE3(socket, int, family, int, type, int, protocol) |
1218 | { | 1218 | { |
1219 | int retval; | 1219 | int retval; |
1220 | struct socket *sock; | 1220 | struct socket *sock; |
@@ -1255,8 +1255,8 @@ out_release: | |||
1255 | * Create a pair of connected sockets. | 1255 | * Create a pair of connected sockets. |
1256 | */ | 1256 | */ |
1257 | 1257 | ||
1258 | asmlinkage long sys_socketpair(int family, int type, int protocol, | 1258 | SYSCALL_DEFINE4(socketpair, int, family, int, type, int, protocol, |
1259 | int __user *usockvec) | 1259 | int __user *, usockvec) |
1260 | { | 1260 | { |
1261 | struct socket *sock1, *sock2; | 1261 | struct socket *sock1, *sock2; |
1262 | int fd1, fd2, err; | 1262 | int fd1, fd2, err; |
@@ -1385,7 +1385,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen) | |||
1385 | * ready for listening. | 1385 | * ready for listening. |
1386 | */ | 1386 | */ |
1387 | 1387 | ||
1388 | asmlinkage long sys_listen(int fd, int backlog) | 1388 | SYSCALL_DEFINE2(listen, int, fd, int, backlog) |
1389 | { | 1389 | { |
1390 | struct socket *sock; | 1390 | struct socket *sock; |
1391 | int err, fput_needed; | 1391 | int err, fput_needed; |
@@ -1615,9 +1615,9 @@ SYSCALL_DEFINE3(getpeername, int, fd, struct sockaddr __user *, usockaddr, | |||
1615 | * the protocol. | 1615 | * the protocol. |
1616 | */ | 1616 | */ |
1617 | 1617 | ||
1618 | asmlinkage long sys_sendto(int fd, void __user *buff, size_t len, | 1618 | SYSCALL_DEFINE6(sendto, int, fd, void __user *, buff, size_t, len, |
1619 | unsigned flags, struct sockaddr __user *addr, | 1619 | unsigned, flags, struct sockaddr __user *, addr, |
1620 | int addr_len) | 1620 | int, addr_len) |
1621 | { | 1621 | { |
1622 | struct socket *sock; | 1622 | struct socket *sock; |
1623 | struct sockaddr_storage address; | 1623 | struct sockaddr_storage address; |
@@ -1660,7 +1660,8 @@ out: | |||
1660 | * Send a datagram down a socket. | 1660 | * Send a datagram down a socket. |
1661 | */ | 1661 | */ |
1662 | 1662 | ||
1663 | asmlinkage long sys_send(int fd, void __user *buff, size_t len, unsigned flags) | 1663 | SYSCALL_DEFINE4(send, int, fd, void __user *, buff, size_t, len, |
1664 | unsigned, flags) | ||
1664 | { | 1665 | { |
1665 | return sys_sendto(fd, buff, len, flags, NULL, 0); | 1666 | return sys_sendto(fd, buff, len, flags, NULL, 0); |
1666 | } | 1667 | } |
@@ -1671,9 +1672,9 @@ asmlinkage long sys_send(int fd, void __user *buff, size_t len, unsigned flags) | |||
1671 | * sender address from kernel to user space. | 1672 | * sender address from kernel to user space. |
1672 | */ | 1673 | */ |
1673 | 1674 | ||
1674 | asmlinkage long sys_recvfrom(int fd, void __user *ubuf, size_t size, | 1675 | SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size, |
1675 | unsigned flags, struct sockaddr __user *addr, | 1676 | unsigned, flags, struct sockaddr __user *, addr, |
1676 | int __user *addr_len) | 1677 | int __user *, addr_len) |
1677 | { | 1678 | { |
1678 | struct socket *sock; | 1679 | struct socket *sock; |
1679 | struct iovec iov; | 1680 | struct iovec iov; |
@@ -1815,7 +1816,7 @@ SYSCALL_DEFINE2(shutdown, int, fd, int, how) | |||
1815 | * BSD sendmsg interface | 1816 | * BSD sendmsg interface |
1816 | */ | 1817 | */ |
1817 | 1818 | ||
1818 | asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags) | 1819 | SYSCALL_DEFINE3(sendmsg, int, fd, struct msghdr __user *, msg, unsigned, flags) |
1819 | { | 1820 | { |
1820 | struct compat_msghdr __user *msg_compat = | 1821 | struct compat_msghdr __user *msg_compat = |
1821 | (struct compat_msghdr __user *)msg; | 1822 | (struct compat_msghdr __user *)msg; |
@@ -1921,8 +1922,8 @@ out: | |||
1921 | * BSD recvmsg interface | 1922 | * BSD recvmsg interface |
1922 | */ | 1923 | */ |
1923 | 1924 | ||
1924 | asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, | 1925 | SYSCALL_DEFINE3(recvmsg, int, fd, struct msghdr __user *, msg, |
1925 | unsigned int flags) | 1926 | unsigned int, flags) |
1926 | { | 1927 | { |
1927 | struct compat_msghdr __user *msg_compat = | 1928 | struct compat_msghdr __user *msg_compat = |
1928 | (struct compat_msghdr __user *)msg; | 1929 | (struct compat_msghdr __user *)msg; |
@@ -2045,7 +2046,7 @@ static const unsigned char nargs[19]={ | |||
2045 | * it is set by the callees. | 2046 | * it is set by the callees. |
2046 | */ | 2047 | */ |
2047 | 2048 | ||
2048 | asmlinkage long sys_socketcall(int call, unsigned long __user *args) | 2049 | SYSCALL_DEFINE2(socketcall, int, call, unsigned long __user *, args) |
2049 | { | 2050 | { |
2050 | unsigned long a[6]; | 2051 | unsigned long a[6]; |
2051 | unsigned long a0, a1; | 2052 | unsigned long a0, a1; |