1 #include <linux/uaccess.h>
2 #include <linux/export.h>
6 * Copy iovec to kernel. Returns -EFAULT on error.
9 int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov,
16 /* Skip over the finished iovecs */
17 while (offset >= iov->iov_len) {
18 offset -= iov->iov_len;
23 u8 __user *base = iov->iov_base + offset;
24 int copy = min_t(unsigned int, len, iov->iov_len - offset);
27 if (copy_from_user(kdata, base, copy))
36 EXPORT_SYMBOL(memcpy_fromiovecend);