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; 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()
870 int flags) in sock_recvmsg_nosec() argument
874 flags); in sock_recvmsg_nosec()
886 int sock_recvmsg(struct socket *sock, struct msghdr *msg, int flags) in sock_recvmsg() argument
888 int err = security_socket_recvmsg(sock, msg, msg_data_left(msg), flags); in sock_recvmsg()
890 return err ?: sock_recvmsg_nosec(sock, msg, flags); in sock_recvmsg()
911 struct kvec *vec, size_t num, size_t size, int flags) in kernel_recvmsg() argument
918 result = sock_recvmsg(sock, msg, flags); in kernel_recvmsg()
928 int flags; in sock_sendpage() local
932 flags = (file->f_flags & O_NONBLOCK) ? MSG_DONTWAIT : 0; in sock_sendpage()
934 flags |= more; in sock_sendpage()
936 return kernel_sendpage(sock, page, offset, size, flags); in sock_sendpage()
941 unsigned int flags) in sock_splice_read() argument
946 return generic_file_splice_read(file, ppos, pipe, len, flags); in sock_splice_read()
948 return sock->ops->splice_read(sock, ppos, pipe, len, flags); in sock_splice_read()
1314 if (test_bit(SOCKWQ_ASYNC_WAITDATA, &wq->flags)) in sock_wake_async()
1318 if (!test_and_clear_bit(SOCKWQ_ASYNC_NOSPACE, &wq->flags)) in sock_wake_async()
1496 int flags; in __sys_socket() local
1504 flags = type & ~SOCK_TYPE_MASK; in __sys_socket()
1505 if (flags & ~(SOCK_CLOEXEC | SOCK_NONBLOCK)) in __sys_socket()
1509 if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK)) in __sys_socket()
1510 flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK; in __sys_socket()
1516 return sock_map_fd(sock, flags & (O_CLOEXEC | O_NONBLOCK)); in __sys_socket()
1533 int flags; in __sys_socketpair() local
1535 flags = type & ~SOCK_TYPE_MASK; in __sys_socketpair()
1536 if (flags & ~(SOCK_CLOEXEC | SOCK_NONBLOCK)) in __sys_socketpair()
1540 if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK)) in __sys_socketpair()
1541 flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK; in __sys_socketpair()
1547 fd1 = get_unused_fd_flags(flags); in __sys_socketpair()
1551 fd2 = get_unused_fd_flags(flags); in __sys_socketpair()
1594 newfile1 = sock_alloc_file(sock1, flags, NULL); in __sys_socketpair()
1601 newfile2 = sock_alloc_file(sock2, flags, NULL); in __sys_socketpair()
1707 int __user *upeer_addrlen, int flags) in __sys_accept4() argument
1714 if (flags & ~(SOCK_CLOEXEC | SOCK_NONBLOCK)) in __sys_accept4()
1717 if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK)) in __sys_accept4()
1718 flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK; in __sys_accept4()
1738 newfd = get_unused_fd_flags(flags); in __sys_accept4()
1744 newfile = sock_alloc_file(newsock, flags, sock->sk->sk_prot_creator->name); in __sys_accept4()
1788 int __user *, upeer_addrlen, int, flags) in SYSCALL_DEFINE4() argument
1790 return __sys_accept4(fd, upeer_sockaddr, upeer_addrlen, flags); in SYSCALL_DEFINE4()
1922 int __sys_sendto(int fd, void __user *buff, size_t len, unsigned int flags, in __sys_sendto() argument
1951 flags |= MSG_DONTWAIT; in __sys_sendto()
1952 msg.msg_flags = flags; in __sys_sendto()
1962 unsigned int, flags, struct sockaddr __user *, addr, in SYSCALL_DEFINE6() argument
1965 return __sys_sendto(fd, buff, len, flags, addr, addr_len); in SYSCALL_DEFINE6()
1973 unsigned int, flags) in SYSCALL_DEFINE4() argument
1975 return __sys_sendto(fd, buff, len, flags, NULL, 0); in SYSCALL_DEFINE4()
1983 int __sys_recvfrom(int fd, void __user *ubuf, size_t size, unsigned int flags, in __sys_recvfrom() argument
2009 flags |= MSG_DONTWAIT; in __sys_recvfrom()
2010 err = sock_recvmsg(sock, &msg, flags); in __sys_recvfrom()
2025 unsigned int, flags, struct sockaddr __user *, addr, in SYSCALL_DEFINE6() argument
2028 return __sys_recvfrom(fd, ubuf, size, flags, addr, addr_len); in SYSCALL_DEFINE6()
2036 unsigned int, flags) in SYSCALL_DEFINE4() argument
2038 return __sys_recvfrom(fd, ubuf, size, flags, NULL, NULL); in SYSCALL_DEFINE4()
2175 #define COMPAT_MSG(msg, member) ((MSG_CMSG_COMPAT & flags) ? &msg##_compat->member : &msg->member)
2237 unsigned int flags, struct used_address *used_address, in ____sys_sendmsg() argument
2251 flags |= (msg_sys->msg_flags & allowed_msghdr_flags); in ____sys_sendmsg()
2253 if ((MSG_CMSG_COMPAT & flags) && ctl_len) { in ____sys_sendmsg()
2281 msg_sys->msg_flags = flags; in ____sys_sendmsg()
2318 struct user_msghdr __user *umsg, unsigned flags, in sendmsg_copy_msghdr() argument
2323 if (flags & MSG_CMSG_COMPAT) { in sendmsg_copy_msghdr()
2338 struct msghdr *msg_sys, unsigned int flags, in ___sys_sendmsg() argument
2348 err = sendmsg_copy_msghdr(msg_sys, msg, flags, &iov); in ___sys_sendmsg()
2352 err = ____sys_sendmsg(sock, msg_sys, flags, used_address, in ___sys_sendmsg()
2362 unsigned int flags) in __sys_sendmsg_sock() argument
2369 err = sendmsg_copy_msghdr(&msg, umsg, flags, &iov); in __sys_sendmsg_sock()
2378 err = ____sys_sendmsg(sock, &msg, flags, NULL, 0); in __sys_sendmsg_sock()
2384 long __sys_sendmsg(int fd, struct user_msghdr __user *msg, unsigned int flags, in __sys_sendmsg() argument
2391 if (forbid_cmsg_compat && (flags & MSG_CMSG_COMPAT)) in __sys_sendmsg()
2398 err = ___sys_sendmsg(sock, msg, &msg_sys, flags, NULL, 0); in __sys_sendmsg()
2405 SYSCALL_DEFINE3(sendmsg, int, fd, struct user_msghdr __user *, msg, unsigned int, flags) in SYSCALL_DEFINE3() argument
2407 return __sys_sendmsg(fd, msg, flags, true); in SYSCALL_DEFINE3()
2415 unsigned int flags, bool forbid_cmsg_compat) in __sys_sendmmsg() argument
2423 unsigned int oflags = flags; in __sys_sendmmsg()
2425 if (forbid_cmsg_compat && (flags & MSG_CMSG_COMPAT)) in __sys_sendmmsg()
2441 flags |= MSG_BATCH; in __sys_sendmmsg()
2445 flags = oflags; in __sys_sendmmsg()
2447 if (MSG_CMSG_COMPAT & flags) { in __sys_sendmmsg()
2449 &msg_sys, flags, &used_address, MSG_EOR); in __sys_sendmmsg()
2457 &msg_sys, flags, &used_address, MSG_EOR); in __sys_sendmmsg()
2482 unsigned int, vlen, unsigned int, flags) in SYSCALL_DEFINE4() argument
2484 return __sys_sendmmsg(fd, mmsg, vlen, flags, true); in SYSCALL_DEFINE4()
2488 struct user_msghdr __user *umsg, unsigned flags, in recvmsg_copy_msghdr() argument
2494 if (MSG_CMSG_COMPAT & flags) { in recvmsg_copy_msghdr()
2511 unsigned int flags, int nosec) in ____sys_recvmsg() argument
2523 msg_sys->msg_flags = flags & (MSG_CMSG_CLOEXEC|MSG_CMSG_COMPAT); in ____sys_recvmsg()
2529 flags |= MSG_DONTWAIT; in ____sys_recvmsg()
2530 err = (nosec ? sock_recvmsg_nosec : sock_recvmsg)(sock, msg_sys, flags); in ____sys_recvmsg()
2546 if (MSG_CMSG_COMPAT & flags) in ____sys_recvmsg()
2560 struct msghdr *msg_sys, unsigned int flags, int nosec) in ___sys_recvmsg() argument
2567 err = recvmsg_copy_msghdr(msg_sys, msg, flags, &uaddr, &iov); in ___sys_recvmsg()
2571 err = ____sys_recvmsg(sock, msg_sys, msg, uaddr, flags, nosec); in ___sys_recvmsg()
2581 unsigned int flags) in __sys_recvmsg_sock() argument
2589 err = recvmsg_copy_msghdr(&msg, umsg, flags, &uaddr, &iov); in __sys_recvmsg_sock()
2598 err = ____sys_recvmsg(sock, &msg, umsg, uaddr, flags, 0); in __sys_recvmsg_sock()
2604 long __sys_recvmsg(int fd, struct user_msghdr __user *msg, unsigned int flags, in __sys_recvmsg() argument
2611 if (forbid_cmsg_compat && (flags & MSG_CMSG_COMPAT)) in __sys_recvmsg()
2618 err = ___sys_recvmsg(sock, msg, &msg_sys, flags, 0); in __sys_recvmsg()
2626 unsigned int, flags) in SYSCALL_DEFINE3() argument
2628 return __sys_recvmsg(fd, msg, flags, true); in SYSCALL_DEFINE3()
2636 unsigned int vlen, unsigned int flags, in do_recvmmsg() argument
2658 if (likely(!(flags & MSG_ERRQUEUE))) { in do_recvmmsg()
2673 if (MSG_CMSG_COMPAT & flags) { in do_recvmmsg()
2675 &msg_sys, flags & ~MSG_WAITFORONE, in do_recvmmsg()
2684 &msg_sys, flags & ~MSG_WAITFORONE, in do_recvmmsg()
2697 if (flags & MSG_WAITFORONE) in do_recvmmsg()
2698 flags |= MSG_DONTWAIT; in do_recvmmsg()
2747 unsigned int vlen, unsigned int flags, in __sys_recvmmsg() argument
2761 return do_recvmmsg(fd, mmsg, vlen, flags, NULL); in __sys_recvmmsg()
2763 datagrams = do_recvmmsg(fd, mmsg, vlen, flags, &timeout_sys); in __sys_recvmmsg()
2778 unsigned int, vlen, unsigned int, flags, in SYSCALL_DEFINE5() argument
2781 if (flags & MSG_CMSG_COMPAT) in SYSCALL_DEFINE5()
2784 return __sys_recvmmsg(fd, mmsg, vlen, flags, timeout, NULL); in SYSCALL_DEFINE5()
2789 unsigned int, vlen, unsigned int, flags, in SYSCALL_DEFINE5() argument
2792 if (flags & MSG_CMSG_COMPAT) in SYSCALL_DEFINE5()
2795 return __sys_recvmmsg(fd, mmsg, vlen, flags, NULL, timeout); in SYSCALL_DEFINE5()
3609 int kernel_accept(struct socket *sock, struct socket **newsock, int flags) in kernel_accept() argument
3619 err = sock->ops->accept(sock, *newsock, flags, true); in kernel_accept()
3648 int flags) in kernel_connect() argument
3650 return sock->ops->connect(sock, addr, addrlen, flags); in kernel_connect()
3761 size_t size, int flags) in kernel_sendpage() argument
3764 return sock->ops->sendpage(sock, page, offset, size, flags); in kernel_sendpage()
3766 return sock_no_sendpage(sock, page, offset, size, flags); in kernel_sendpage()
3783 size_t size, int flags) in kernel_sendpage_locked() argument
3789 flags); in kernel_sendpage_locked()
3791 return sock_no_sendpage_locked(sk, page, offset, size, flags); in kernel_sendpage_locked()