Lines Matching refs:to

102  * @to: destination address
104 * @n: number of bytes to copy
106 * Instrument reads from kernel memory, that are due to copy_to_user (and
110 instrument_copy_to_user(void __user *to, const void *from, unsigned long n)
114 kmsan_copy_to_user(to, from, n, 0);
119 * @to: destination address
121 * @n: number of bytes to copy
123 * Instrument writes to kernel memory, that are due to copy_from_user (and
127 instrument_copy_from_user_before(const void *to, const void __user *from, unsigned long n)
129 kasan_check_write(to, n);
130 kcsan_check_write(to, n);
135 * @to: destination address
137 * @n: number of bytes to copy
140 * Instrument writes to kernel memory, that are due to copy_from_user (and
144 instrument_copy_from_user_after(const void *to, const void __user *from,
147 kmsan_unpoison_memory(to, n - left);
152 * @to: destination address
154 * @n: number of bytes to copy
159 static __always_inline void instrument_memcpy_before(void *to, const void *from,
162 kasan_check_write(to, n);
164 kcsan_check_write(to, n);
170 * @to: destination address
172 * @n: number of bytes to copy
178 static __always_inline void instrument_memcpy_after(void *to, const void *from,
182 kmsan_memmove(to, from, n - left);
186 * instrument_get_user() - add instrumentation to get_user()-like macros
187 * @to: destination variable, may not be address-taken
193 #define instrument_get_user(to) \
195 u64 __tmp = (u64)(to); \
197 to = __tmp; \
202 * instrument_put_user() - add instrumentation to put_user()-like macros
204 * @ptr: userspace pointer to copy to
205 * @size: number of bytes to copy