xref: /linux/rust/helpers/uaccess.c (revision 69050f8d6d075dc01af7a5f2f550a8067510366f)
1 // SPDX-License-Identifier: GPL-2.0
2 
3 #include <linux/uaccess.h>
4 
5 __rust_helper unsigned long
6 rust_helper_copy_from_user(void *to, const void __user *from, unsigned long n)
7 {
8 	return copy_from_user(to, from, n);
9 }
10 
11 __rust_helper unsigned long
12 rust_helper_copy_to_user(void __user *to, const void *from, unsigned long n)
13 {
14 	return copy_to_user(to, from, n);
15 }
16 
17 #ifdef INLINE_COPY_FROM_USER
18 __rust_helper
19 unsigned long rust_helper__copy_from_user(void *to, const void __user *from, unsigned long n)
20 {
21 	return _inline_copy_from_user(to, from, n);
22 }
23 
24 __rust_helper
25 unsigned long rust_helper__copy_to_user(void __user *to, const void *from, unsigned long n)
26 {
27 	return _inline_copy_to_user(to, from, n);
28 }
29 #endif
30