Lines Matching refs:flags
129 unsigned int flags);
244 ei->socket.wq.flags = 0; in sock_alloc_inode()
247 ei->socket.flags = 0; in sock_alloc_inode()
304 int flags) in sockfs_xattr_get() argument
326 size_t size, int flags) in sockfs_security_xattr_set() argument
391 struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname) in sock_alloc_file() argument
399 O_RDWR | (flags & O_NONBLOCK), in sock_alloc_file()
412 static int sock_map_fd(struct socket *sock, int flags) in sock_map_fd() argument
415 int fd = get_unused_fd_flags(flags); in sock_map_fd()
421 newfile = sock_alloc_file(sock, flags, NULL); in sock_map_fd()
489 *fput_needed = f.flags & FDPUT_FPUT; in sockfd_lookup_light()
617 u8 flags = *tx_flags; in __sock_tx_timestamp() local
620 flags |= SKBTX_HW_TSTAMP; in __sock_tx_timestamp()
623 flags |= SKBTX_SW_TSTAMP; in __sock_tx_timestamp()
626 flags |= SKBTX_SCHED_TSTAMP; in __sock_tx_timestamp()
628 *tx_flags = flags; in __sock_tx_timestamp()
889 int flags) in sock_recvmsg_nosec() argument
893 flags); in sock_recvmsg_nosec()
905 int sock_recvmsg(struct socket *sock, struct msghdr *msg, int flags) in sock_recvmsg() argument
907 int err = security_socket_recvmsg(sock, msg, msg_data_left(msg), flags); in sock_recvmsg()
909 return err ?: sock_recvmsg_nosec(sock, msg, flags); in sock_recvmsg()
930 struct kvec *vec, size_t num, size_t size, int flags) in kernel_recvmsg() argument
937 result = sock_recvmsg(sock, msg, flags); in kernel_recvmsg()
947 int flags; in sock_sendpage() local
951 flags = (file->f_flags & O_NONBLOCK) ? MSG_DONTWAIT : 0; in sock_sendpage()
953 flags |= more; in sock_sendpage()
955 return kernel_sendpage(sock, page, offset, size, flags); in sock_sendpage()
960 unsigned int flags) in sock_splice_read() argument
965 return generic_file_splice_read(file, ppos, pipe, len, flags); in sock_splice_read()
967 return sock->ops->splice_read(sock, ppos, pipe, len, flags); in sock_splice_read()
1322 if (test_bit(SOCKWQ_ASYNC_WAITDATA, &wq->flags)) in sock_wake_async()
1326 if (!test_and_clear_bit(SOCKWQ_ASYNC_NOSPACE, &wq->flags)) in sock_wake_async()
1504 int flags; in __sys_socket() local
1512 flags = type & ~SOCK_TYPE_MASK; in __sys_socket()
1513 if (flags & ~(SOCK_CLOEXEC | SOCK_NONBLOCK)) in __sys_socket()
1517 if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK)) in __sys_socket()
1518 flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK; in __sys_socket()
1524 return sock_map_fd(sock, flags & (O_CLOEXEC | O_NONBLOCK)); in __sys_socket()
1541 int flags; in __sys_socketpair() local
1543 flags = type & ~SOCK_TYPE_MASK; in __sys_socketpair()
1544 if (flags & ~(SOCK_CLOEXEC | SOCK_NONBLOCK)) in __sys_socketpair()
1548 if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK)) in __sys_socketpair()
1549 flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK; in __sys_socketpair()
1555 fd1 = get_unused_fd_flags(flags); in __sys_socketpair()
1559 fd2 = get_unused_fd_flags(flags); in __sys_socketpair()
1602 newfile1 = sock_alloc_file(sock1, flags, NULL); in __sys_socketpair()
1609 newfile2 = sock_alloc_file(sock2, flags, NULL); in __sys_socketpair()
1715 int __user *upeer_addrlen, int flags) in __sys_accept4() argument
1722 if (flags & ~(SOCK_CLOEXEC | SOCK_NONBLOCK)) in __sys_accept4()
1725 if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK)) in __sys_accept4()
1726 flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK; in __sys_accept4()
1746 newfd = get_unused_fd_flags(flags); in __sys_accept4()
1752 newfile = sock_alloc_file(newsock, flags, sock->sk->sk_prot_creator->name); in __sys_accept4()
1796 int __user *, upeer_addrlen, int, flags) in SYSCALL_DEFINE4() argument
1798 return __sys_accept4(fd, upeer_sockaddr, upeer_addrlen, flags); in SYSCALL_DEFINE4()
1930 int __sys_sendto(int fd, void __user *buff, size_t len, unsigned int flags, in __sys_sendto() argument
1959 flags |= MSG_DONTWAIT; in __sys_sendto()
1960 msg.msg_flags = flags; in __sys_sendto()
1970 unsigned int, flags, struct sockaddr __user *, addr, in SYSCALL_DEFINE6() argument
1973 return __sys_sendto(fd, buff, len, flags, addr, addr_len); in SYSCALL_DEFINE6()
1981 unsigned int, flags) in SYSCALL_DEFINE4() argument
1983 return __sys_sendto(fd, buff, len, flags, NULL, 0); in SYSCALL_DEFINE4()
1991 int __sys_recvfrom(int fd, void __user *ubuf, size_t size, unsigned int flags, in __sys_recvfrom() argument
2017 flags |= MSG_DONTWAIT; in __sys_recvfrom()
2018 err = sock_recvmsg(sock, &msg, flags); in __sys_recvfrom()
2033 unsigned int, flags, struct sockaddr __user *, addr, in SYSCALL_DEFINE6() argument
2036 return __sys_recvfrom(fd, ubuf, size, flags, addr, addr_len); in SYSCALL_DEFINE6()
2044 unsigned int, flags) in SYSCALL_DEFINE4() argument
2046 return __sys_recvfrom(fd, ubuf, size, flags, NULL, NULL); in SYSCALL_DEFINE4()
2183 #define COMPAT_MSG(msg, member) ((MSG_CMSG_COMPAT & flags) ? &msg##_compat->member : &msg->member)
2245 unsigned int flags, struct used_address *used_address, in ____sys_sendmsg() argument
2259 flags |= (msg_sys->msg_flags & allowed_msghdr_flags); in ____sys_sendmsg()
2261 if ((MSG_CMSG_COMPAT & flags) && ctl_len) { in ____sys_sendmsg()
2289 msg_sys->msg_flags = flags; in ____sys_sendmsg()
2326 struct user_msghdr __user *umsg, unsigned flags, in sendmsg_copy_msghdr() argument
2331 if (flags & MSG_CMSG_COMPAT) { in sendmsg_copy_msghdr()
2346 struct msghdr *msg_sys, unsigned int flags, in ___sys_sendmsg() argument
2356 err = sendmsg_copy_msghdr(msg_sys, msg, flags, &iov); in ___sys_sendmsg()
2360 err = ____sys_sendmsg(sock, msg_sys, flags, used_address, in ___sys_sendmsg()
2370 unsigned int flags) in __sys_sendmsg_sock() argument
2377 err = sendmsg_copy_msghdr(&msg, umsg, flags, &iov); in __sys_sendmsg_sock()
2386 err = ____sys_sendmsg(sock, &msg, flags, NULL, 0); in __sys_sendmsg_sock()
2392 long __sys_sendmsg(int fd, struct user_msghdr __user *msg, unsigned int flags, in __sys_sendmsg() argument
2399 if (forbid_cmsg_compat && (flags & MSG_CMSG_COMPAT)) in __sys_sendmsg()
2406 err = ___sys_sendmsg(sock, msg, &msg_sys, flags, NULL, 0); in __sys_sendmsg()
2413 SYSCALL_DEFINE3(sendmsg, int, fd, struct user_msghdr __user *, msg, unsigned int, flags) in SYSCALL_DEFINE3() argument
2415 return __sys_sendmsg(fd, msg, flags, true); in SYSCALL_DEFINE3()
2423 unsigned int flags, bool forbid_cmsg_compat) in __sys_sendmmsg() argument
2431 unsigned int oflags = flags; in __sys_sendmmsg()
2433 if (forbid_cmsg_compat && (flags & MSG_CMSG_COMPAT)) in __sys_sendmmsg()
2449 flags |= MSG_BATCH; in __sys_sendmmsg()
2453 flags = oflags; in __sys_sendmmsg()
2455 if (MSG_CMSG_COMPAT & flags) { in __sys_sendmmsg()
2457 &msg_sys, flags, &used_address, MSG_EOR); in __sys_sendmmsg()
2465 &msg_sys, flags, &used_address, MSG_EOR); in __sys_sendmmsg()
2490 unsigned int, vlen, unsigned int, flags) in SYSCALL_DEFINE4() argument
2492 return __sys_sendmmsg(fd, mmsg, vlen, flags, true); in SYSCALL_DEFINE4()
2496 struct user_msghdr __user *umsg, unsigned flags, in recvmsg_copy_msghdr() argument
2502 if (MSG_CMSG_COMPAT & flags) { in recvmsg_copy_msghdr()
2519 unsigned int flags, int nosec) in ____sys_recvmsg() argument
2531 msg_sys->msg_flags = flags & (MSG_CMSG_CLOEXEC|MSG_CMSG_COMPAT); in ____sys_recvmsg()
2537 flags |= MSG_DONTWAIT; in ____sys_recvmsg()
2538 err = (nosec ? sock_recvmsg_nosec : sock_recvmsg)(sock, msg_sys, flags); in ____sys_recvmsg()
2554 if (MSG_CMSG_COMPAT & flags) in ____sys_recvmsg()
2568 struct msghdr *msg_sys, unsigned int flags, int nosec) in ___sys_recvmsg() argument
2575 err = recvmsg_copy_msghdr(msg_sys, msg, flags, &uaddr, &iov); in ___sys_recvmsg()
2579 err = ____sys_recvmsg(sock, msg_sys, msg, uaddr, flags, nosec); in ___sys_recvmsg()
2589 unsigned int flags) in __sys_recvmsg_sock() argument
2597 err = recvmsg_copy_msghdr(&msg, umsg, flags, &uaddr, &iov); in __sys_recvmsg_sock()
2606 err = ____sys_recvmsg(sock, &msg, umsg, uaddr, flags, 0); in __sys_recvmsg_sock()
2612 long __sys_recvmsg(int fd, struct user_msghdr __user *msg, unsigned int flags, in __sys_recvmsg() argument
2619 if (forbid_cmsg_compat && (flags & MSG_CMSG_COMPAT)) in __sys_recvmsg()
2626 err = ___sys_recvmsg(sock, msg, &msg_sys, flags, 0); in __sys_recvmsg()
2634 unsigned int, flags) in SYSCALL_DEFINE3() argument
2636 return __sys_recvmsg(fd, msg, flags, true); in SYSCALL_DEFINE3()
2644 unsigned int vlen, unsigned int flags, in do_recvmmsg() argument
2666 if (likely(!(flags & MSG_ERRQUEUE))) { in do_recvmmsg()
2681 if (MSG_CMSG_COMPAT & flags) { in do_recvmmsg()
2683 &msg_sys, flags & ~MSG_WAITFORONE, in do_recvmmsg()
2692 &msg_sys, flags & ~MSG_WAITFORONE, in do_recvmmsg()
2705 if (flags & MSG_WAITFORONE) in do_recvmmsg()
2706 flags |= MSG_DONTWAIT; in do_recvmmsg()
2755 unsigned int vlen, unsigned int flags, in __sys_recvmmsg() argument
2769 return do_recvmmsg(fd, mmsg, vlen, flags, NULL); in __sys_recvmmsg()
2771 datagrams = do_recvmmsg(fd, mmsg, vlen, flags, &timeout_sys); in __sys_recvmmsg()
2786 unsigned int, vlen, unsigned int, flags, in SYSCALL_DEFINE5() argument
2789 if (flags & MSG_CMSG_COMPAT) in SYSCALL_DEFINE5()
2792 return __sys_recvmmsg(fd, mmsg, vlen, flags, timeout, NULL); in SYSCALL_DEFINE5()
2797 unsigned int, vlen, unsigned int, flags, in SYSCALL_DEFINE5() argument
2800 if (flags & MSG_CMSG_COMPAT) in SYSCALL_DEFINE5()
2803 return __sys_recvmmsg(fd, mmsg, vlen, flags, NULL, timeout); in SYSCALL_DEFINE5()
3623 int kernel_accept(struct socket *sock, struct socket **newsock, int flags) in kernel_accept() argument
3633 err = sock->ops->accept(sock, *newsock, flags, true); in kernel_accept()
3662 int flags) in kernel_connect() argument
3668 return sock->ops->connect(sock, (struct sockaddr *)&address, addrlen, flags); in kernel_connect()
3779 size_t size, int flags) in kernel_sendpage() argument
3782 return sock->ops->sendpage(sock, page, offset, size, flags); in kernel_sendpage()
3784 return sock_no_sendpage(sock, page, offset, size, flags); in kernel_sendpage()
3801 size_t size, int flags) in kernel_sendpage_locked() argument
3807 flags); in kernel_sendpage_locked()
3809 return sock_no_sendpage_locked(sk, page, offset, size, flags); in kernel_sendpage_locked()