Lines Matching refs:to
70 * @count: Maximum number of bytes to copy, including the trailing NUL.
72 * Copies a NUL-terminated string from userspace to kernel space.
79 * If access to userspace fails, returns -EFAULT (some data may have been
99 * @count: Maximum number of bytes to copy, including the trailing NUL.
101 * Copies a NUL-terminated string from userspace to kernel space.
106 * If access to userspace fails, returns -EFAULT (some data may have been
147 * @to: Destination address, in user space.
148 * @n: Number of bytes to zero.
156 clear_user(void __user *to, unsigned long n)
159 if (access_ok(VERIFY_WRITE, to, n))
160 __do_clear_user(to, n);
167 * @to: Destination address, in user space.
168 * @n: Number of bytes to zero.
177 __clear_user(void __user *to, unsigned long n)
179 __do_clear_user(to, n);
186 * @s: The string to measure.
230 __copy_user_intel(void __user *to, const void *from, unsigned long size)
331 : "1"(to), "2"(from), "0"(size)
337 __copy_user_zeroing_intel(void *to, const void __user *from, unsigned long size)
426 : "1"(to), "2"(from), "0"(size)
436 static unsigned long __copy_user_zeroing_intel_nocache(void *to,
528 : "1"(to), "2"(from), "0"(size)
533 static unsigned long __copy_user_intel_nocache(void *to,
619 : "1"(to), "2"(from), "0"(size)
627 * Leave these declared but undefined. They should not be any references to
630 unsigned long __copy_user_zeroing_intel(void *to, const void __user *from,
632 unsigned long __copy_user_intel(void __user *to, const void *from,
634 unsigned long __copy_user_zeroing_intel_nocache(void *to,
639 #define __copy_user(to, from, size) \
671 : "3"(size), "0"(size), "1"(to), "2"(from) \
675 #define __copy_user_zeroing(to, from, size) \
713 : "3"(size), "0"(size), "1"(to), "2"(from) \
717 unsigned long __copy_to_user_ll(void __user *to, const void *from,
722 ((unsigned long)to) < TASK_SIZE) {
726 * length to take the slow path.
733 * from supervisory mode, and due to preemption or SMP,
738 unsigned long offset = ((unsigned long)to)%PAGE_SIZE;
750 (unsigned long)to, 1, 1, 0, &pg, NULL);
771 to += len;
777 if (movsl_is_ok(to, from, n))
778 __copy_user(to, from, n);
780 n = __copy_user_intel(to, from, n);
785 unsigned long __copy_from_user_ll(void *to, const void __user *from,
788 if (movsl_is_ok(to, from, n))
789 __copy_user_zeroing(to, from, n);
791 n = __copy_user_zeroing_intel(to, from, n);
796 unsigned long __copy_from_user_ll_nozero(void *to, const void __user *from,
799 if (movsl_is_ok(to, from, n))
800 __copy_user(to, from, n);
802 n = __copy_user_intel((void __user *)to,
808 unsigned long __copy_from_user_ll_nocache(void *to, const void __user *from,
813 n = __copy_user_zeroing_intel_nocache(to, from, n);
815 __copy_user_zeroing(to, from, n);
817 __copy_user_zeroing(to, from, n);
823 unsigned long __copy_from_user_ll_nocache_nozero(void *to, const void __user *from,
828 n = __copy_user_intel_nocache(to, from, n);
830 __copy_user(to, from, n);
832 __copy_user(to, from, n);
840 * @to: Destination address, in user space.
842 * @n: Number of bytes to copy.
846 * Copy data from kernel space to user space.
852 copy_to_user(void __user *to, const void *from, unsigned long n)
854 if (access_ok(VERIFY_WRITE, to, n))
855 n = __copy_to_user(to, from, n);
862 * @to: Destination address, in kernel space.
864 * @n: Number of bytes to copy.
868 * Copy data from user space to kernel space.
874 * data to the requested size using zero bytes.
877 _copy_from_user(void *to, const void __user *from, unsigned long n)
880 n = __copy_from_user(to, from, n);
882 memset(to, 0, n);