aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/socket.c63
1 files changed, 32 insertions, 31 deletions
diff --git a/net/socket.c b/net/socket.c
index 06603d73c411..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
1217asmlinkage long sys_socket(int family, int type, int protocol) 1217SYSCALL_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
1258asmlinkage long sys_socketpair(int family, int type, int protocol, 1258SYSCALL_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;
@@ -1356,7 +1356,7 @@ out_fd1:
1356 * the protocol layer (having also checked the address is ok). 1356 * the protocol layer (having also checked the address is ok).
1357 */ 1357 */
1358 1358
1359asmlinkage long sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen) 1359SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
1360{ 1360{
1361 struct socket *sock; 1361 struct socket *sock;
1362 struct sockaddr_storage address; 1362 struct sockaddr_storage address;
@@ -1385,7 +1385,7 @@ asmlinkage long sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen)
1385 * ready for listening. 1385 * ready for listening.
1386 */ 1386 */
1387 1387
1388asmlinkage long sys_listen(int fd, int backlog) 1388SYSCALL_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;
@@ -1418,8 +1418,8 @@ asmlinkage long sys_listen(int fd, int backlog)
1418 * clean when we restucture accept also. 1418 * clean when we restucture accept also.
1419 */ 1419 */
1420 1420
1421asmlinkage long sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr, 1421SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
1422 int __user *upeer_addrlen, int flags) 1422 int __user *, upeer_addrlen, int, flags)
1423{ 1423{
1424 struct socket *sock, *newsock; 1424 struct socket *sock, *newsock;
1425 struct file *newfile; 1425 struct file *newfile;
@@ -1502,8 +1502,8 @@ out_fd:
1502 goto out_put; 1502 goto out_put;
1503} 1503}
1504 1504
1505asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr, 1505SYSCALL_DEFINE3(accept, int, fd, struct sockaddr __user *, upeer_sockaddr,
1506 int __user *upeer_addrlen) 1506 int __user *, upeer_addrlen)
1507{ 1507{
1508 return sys_accept4(fd, upeer_sockaddr, upeer_addrlen, 0); 1508 return sys_accept4(fd, upeer_sockaddr, upeer_addrlen, 0);
1509} 1509}
@@ -1520,8 +1520,8 @@ asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr,
1520 * include the -EINPROGRESS status for such sockets. 1520 * include the -EINPROGRESS status for such sockets.
1521 */ 1521 */
1522 1522
1523asmlinkage long sys_connect(int fd, struct sockaddr __user *uservaddr, 1523SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr,
1524 int addrlen) 1524 int, addrlen)
1525{ 1525{
1526 struct socket *sock; 1526 struct socket *sock;
1527 struct sockaddr_storage address; 1527 struct sockaddr_storage address;
@@ -1552,8 +1552,8 @@ out:
1552 * name to user space. 1552 * name to user space.
1553 */ 1553 */
1554 1554
1555asmlinkage long sys_getsockname(int fd, struct sockaddr __user *usockaddr, 1555SYSCALL_DEFINE3(getsockname, int, fd, struct sockaddr __user *, usockaddr,
1556 int __user *usockaddr_len) 1556 int __user *, usockaddr_len)
1557{ 1557{
1558 struct socket *sock; 1558 struct socket *sock;
1559 struct sockaddr_storage address; 1559 struct sockaddr_storage address;
@@ -1583,8 +1583,8 @@ out:
1583 * name to user space. 1583 * name to user space.
1584 */ 1584 */
1585 1585
1586asmlinkage long sys_getpeername(int fd, struct sockaddr __user *usockaddr, 1586SYSCALL_DEFINE3(getpeername, int, fd, struct sockaddr __user *, usockaddr,
1587 int __user *usockaddr_len) 1587 int __user *, usockaddr_len)
1588{ 1588{
1589 struct socket *sock; 1589 struct socket *sock;
1590 struct sockaddr_storage address; 1590 struct sockaddr_storage address;
@@ -1615,9 +1615,9 @@ asmlinkage long sys_getpeername(int fd, struct sockaddr __user *usockaddr,
1615 * the protocol. 1615 * the protocol.
1616 */ 1616 */
1617 1617
1618asmlinkage long sys_sendto(int fd, void __user *buff, size_t len, 1618SYSCALL_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
1663asmlinkage long sys_send(int fd, void __user *buff, size_t len, unsigned flags) 1663SYSCALL_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
1674asmlinkage long sys_recvfrom(int fd, void __user *ubuf, size_t size, 1675SYSCALL_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;
@@ -1725,8 +1726,8 @@ asmlinkage long sys_recv(int fd, void __user *ubuf, size_t size,
1725 * to pass the user mode parameter for the protocols to sort out. 1726 * to pass the user mode parameter for the protocols to sort out.
1726 */ 1727 */
1727 1728
1728asmlinkage long sys_setsockopt(int fd, int level, int optname, 1729SYSCALL_DEFINE5(setsockopt, int, fd, int, level, int, optname,
1729 char __user *optval, int optlen) 1730 char __user *, optval, int, optlen)
1730{ 1731{
1731 int err, fput_needed; 1732 int err, fput_needed;
1732 struct socket *sock; 1733 struct socket *sock;
@@ -1759,8 +1760,8 @@ out_put:
1759 * to pass a user mode parameter for the protocols to sort out. 1760 * to pass a user mode parameter for the protocols to sort out.
1760 */ 1761 */
1761 1762
1762asmlinkage long sys_getsockopt(int fd, int level, int optname, 1763SYSCALL_DEFINE5(getsockopt, int, fd, int, level, int, optname,
1763 char __user *optval, int __user *optlen) 1764 char __user *, optval, int __user *, optlen)
1764{ 1765{
1765 int err, fput_needed; 1766 int err, fput_needed;
1766 struct socket *sock; 1767 struct socket *sock;
@@ -1789,7 +1790,7 @@ out_put:
1789 * Shutdown a socket. 1790 * Shutdown a socket.
1790 */ 1791 */
1791 1792
1792asmlinkage long sys_shutdown(int fd, int how) 1793SYSCALL_DEFINE2(shutdown, int, fd, int, how)
1793{ 1794{
1794 int err, fput_needed; 1795 int err, fput_needed;
1795 struct socket *sock; 1796 struct socket *sock;
@@ -1815,7 +1816,7 @@ asmlinkage long sys_shutdown(int fd, int how)
1815 * BSD sendmsg interface 1816 * BSD sendmsg interface
1816 */ 1817 */
1817 1818
1818asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags) 1819SYSCALL_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
1924asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, 1925SYSCALL_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
2048asmlinkage long sys_socketcall(int call, unsigned long __user *args) 2049SYSCALL_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;