Lines Matching full:from

54  * Architectures should provide two primitives (raw_copy_{to,from}_user())
55 * and get rid of their private instances of copy_{to,from}_user() and
56 * __copy_{to,from}_user{,_inatomic}().
58 * raw_copy_{to,from}_user(to, from, size) should copy up to size bytes and
63 * Both of these functions should attempt to copy size bytes starting at from
68 * If raw_copy_{to,from}_user(to, from, size) returns N, size - N bytes starting
69 * at to must become equal to the bytes fetched from the corresponding area
70 * starting at from. All data past to + size - N must be left unmodified.
79 * on store should happen. Interpretation of from is affected by set_fs().
84 * the 6 functions (copy_{to,from}_user(), __copy_{to,from}_user_inatomic())
86 * copy_{to,from}_user() might or might not be inlined. If you want them
87 * inlined, have asm/uaccess.h define INLINE_COPY_{TO,FROM}_USER.
99 __copy_from_user_inatomic(void *to, const void __user *from, unsigned long n) in __copy_from_user_inatomic() argument
101 instrument_copy_from_user(to, from, n); in __copy_from_user_inatomic()
103 return raw_copy_from_user(to, from, n); in __copy_from_user_inatomic()
107 __copy_from_user(void *to, const void __user *from, unsigned long n) in __copy_from_user() argument
112 instrument_copy_from_user(to, from, n); in __copy_from_user()
114 return raw_copy_from_user(to, from, n); in __copy_from_user()
120 * @from: Source address, in kernel space.
125 * Copy data from kernel space to user space. Caller must check
131 __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n) in __copy_to_user_inatomic() argument
135 instrument_copy_to_user(to, from, n); in __copy_to_user_inatomic()
136 check_object_size(from, n, true); in __copy_to_user_inatomic()
137 return raw_copy_to_user(to, from, n); in __copy_to_user_inatomic()
141 __copy_to_user(void __user *to, const void *from, unsigned long n) in __copy_to_user() argument
146 instrument_copy_to_user(to, from, n); in __copy_to_user()
147 check_object_size(from, n, true); in __copy_to_user()
148 return raw_copy_to_user(to, from, n); in __copy_to_user()
153 _copy_from_user(void *to, const void __user *from, unsigned long n) in _copy_from_user() argument
157 if (!should_fail_usercopy() && likely(access_ok(from, n))) { in _copy_from_user()
158 instrument_copy_from_user(to, from, n); in _copy_from_user()
159 res = raw_copy_from_user(to, from, n); in _copy_from_user()
172 _copy_to_user(void __user *to, const void *from, unsigned long n) in _copy_to_user() argument
178 instrument_copy_to_user(to, from, n); in _copy_to_user()
179 n = raw_copy_to_user(to, from, n); in _copy_to_user()
189 copy_from_user(void *to, const void __user *from, unsigned long n) in copy_from_user() argument
192 n = _copy_from_user(to, from, n); in copy_from_user()
197 copy_to_user(void __user *to, const void *from, unsigned long n) in copy_to_user() argument
199 if (likely(check_copy_size(from, n, true))) in copy_to_user()
200 n = _copy_to_user(to, from, n); in copy_to_user()
205 copy_in_user(void __user *to, const void __user *from, unsigned long n) in copy_in_user() argument
208 if (access_ok(to, n) && access_ok(from, n)) in copy_in_user()
209 n = raw_copy_in_user(to, from, n); in copy_in_user()
241 * User access methods will not sleep when called from a pagefault_disabled()
287 __copy_from_user_inatomic_nocache(void *to, const void __user *from, in __copy_from_user_inatomic_nocache() argument
290 return __copy_from_user_inatomic(to, from, n); in __copy_from_user_inatomic_nocache()
295 extern __must_check int check_zeroed_user(const void __user *from, size_t size);
298 * copy_struct_from_user: copy a struct from userspace
305 * Copies a struct from userspace to kernel space, in a way that guarantees
382 * get_kernel_nofault(): safely attempt to read from a location
384 * @ptr: address to read from