Lines Matching full:from

14  * Architectures should provide two primitives (raw_copy_{to,from}_user())
15 * and get rid of their private instances of copy_{to,from}_user() and
16 * __copy_{to,from}_user{,_inatomic}().
18 * raw_copy_{to,from}_user(to, from, size) should copy up to size bytes and
23 * Both of these functions should attempt to copy size bytes starting at from
28 * If raw_copy_{to,from}_user(to, from, size) returns N, size - N bytes starting
29 * at to must become equal to the bytes fetched from the corresponding area
30 * starting at from. All data past to + size - N must be left unmodified.
39 * on store should happen. Interpretation of from is affected by set_fs().
44 * the 6 functions (copy_{to,from}_user(), __copy_{to,from}_user_inatomic())
46 * copy_{to,from}_user() might or might not be inlined. If you want them
47 * inlined, have asm/uaccess.h define INLINE_COPY_{TO,FROM}_USER.
59 __copy_from_user_inatomic(void *to, const void __user *from, unsigned long n) in __copy_from_user_inatomic() argument
63 return raw_copy_from_user(to, from, n); in __copy_from_user_inatomic()
67 __copy_from_user(void *to, const void __user *from, unsigned long n) in __copy_from_user() argument
72 return raw_copy_from_user(to, from, n); in __copy_from_user()
78 * @from: Source address, in kernel space.
83 * Copy data from kernel space to user space. Caller must check
89 __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n) in __copy_to_user_inatomic() argument
91 kasan_check_read(from, n); in __copy_to_user_inatomic()
92 check_object_size(from, n, true); in __copy_to_user_inatomic()
93 return raw_copy_to_user(to, from, n); in __copy_to_user_inatomic()
97 __copy_to_user(void __user *to, const void *from, unsigned long n) in __copy_to_user() argument
100 kasan_check_read(from, n); in __copy_to_user()
101 check_object_size(from, n, true); in __copy_to_user()
102 return raw_copy_to_user(to, from, n); in __copy_to_user()
107 _copy_from_user(void *to, const void __user *from, unsigned long n) in _copy_from_user() argument
111 if (likely(access_ok(from, n))) { in _copy_from_user()
113 res = raw_copy_from_user(to, from, n); in _copy_from_user()
126 _copy_to_user(void __user *to, const void *from, unsigned long n) in _copy_to_user() argument
130 kasan_check_read(from, n); in _copy_to_user()
131 n = raw_copy_to_user(to, from, n); in _copy_to_user()
141 copy_from_user(void *to, const void __user *from, unsigned long n) in copy_from_user() argument
144 n = _copy_from_user(to, from, n); in copy_from_user()
149 copy_to_user(void __user *to, const void *from, unsigned long n) in copy_to_user() argument
151 if (likely(check_copy_size(from, n, true))) in copy_to_user()
152 n = _copy_to_user(to, from, n); in copy_to_user()
157 copy_in_user(void __user *to, const void __user *from, unsigned long n) in copy_in_user() argument
160 if (access_ok(to, n) && access_ok(from, n)) in copy_in_user()
161 n = raw_copy_in_user(to, from, n); in copy_in_user()
180 * User access methods will not sleep when called from a pagefault_disabled()
226 __copy_from_user_inatomic_nocache(void *to, const void __user *from, in __copy_from_user_inatomic_nocache() argument
229 return __copy_from_user_inatomic(to, from, n); in __copy_from_user_inatomic_nocache()
234 extern __must_check int check_zeroed_user(const void __user *from, size_t size);
237 * copy_struct_from_user: copy a struct from userspace
244 * Copies a struct from userspace to kernel space, in a way that guarantees
305 * probe_kernel_read(): safely attempt to read from a location
307 * @src: address to read from
310 * Safely read from address @src to the buffer at @dst. If a kernel fault
317 * probe_user_read(): safely attempt to read from a location in user space
319 * @src: address to read from
322 * Safely read from address @src to the buffer at @dst. If a kernel fault
334 * Safely write to address @dst from the buffer at @src. If a kernel fault
346 * probe_kernel_address(): safely attempt to read from a location
347 * @addr: address to read from