aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/socket.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-02-27 08:11:20 -0700
committerJens Axboe <axboe@kernel.dk>2020-03-10 09:12:49 -0600
commit0a384abfae66651b28e4bbe16883b1ff046ba3b3 (patch)
tree482a79b57843d0a2184ecff7c5535ddf9304a88a /include/linux/socket.h
parentio_uring: add IOSQE_BUFFER_SELECT support for IORING_OP_READV (diff)
downloadwireguard-linux-0a384abfae66651b28e4bbe16883b1ff046ba3b3.tar.xz
wireguard-linux-0a384abfae66651b28e4bbe16883b1ff046ba3b3.zip
net: abstract out normal and compat msghdr import
This splits it into two parts, one that imports the message, and one that imports the iovec. This allows a caller to only do the first part, and import the iovec manually afterwards. No functional changes in this patch. Acked-by: David Miller <davem@davemloft.net> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/socket.h')
-rw-r--r--include/linux/socket.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 2d2313403101..fc59ac825561 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -391,6 +391,10 @@ extern int recvmsg_copy_msghdr(struct msghdr *msg,
struct user_msghdr __user *umsg, unsigned flags,
struct sockaddr __user **uaddr,
struct iovec **iov);
+extern int __copy_msghdr_from_user(struct msghdr *kmsg,
+ struct user_msghdr __user *umsg,
+ struct sockaddr __user **save_addr,
+ struct iovec __user **uiov, size_t *nsegs);
/* helpers which do the actual work for syscalls */
extern int __sys_recvfrom(int fd, void __user *ubuf, size_t size,