Lines Matching refs:dst
20 #define copy_from_kernel_nofault_loop(dst, src, len, type, err_label) \
22 __get_kernel_nofault(dst, src, type, err_label); \
24 dst += sizeof(type); \
29 long copy_from_kernel_nofault(void *dst, const void *src, size_t size)
34 align = (unsigned long)dst | (unsigned long)src;
41 copy_from_kernel_nofault_loop(dst, src, size, u64, Efault);
43 copy_from_kernel_nofault_loop(dst, src, size, u32, Efault);
45 copy_from_kernel_nofault_loop(dst, src, size, u16, Efault);
46 copy_from_kernel_nofault_loop(dst, src, size, u8, Efault);
55 #define copy_to_kernel_nofault_loop(dst, src, len, type, err_label) \
57 __put_kernel_nofault(dst, src, type, err_label); \
58 instrument_write(dst, sizeof(type)); \
59 dst += sizeof(type); \
64 long copy_to_kernel_nofault(void *dst, const void *src, size_t size)
69 align = (unsigned long)dst | (unsigned long)src;
73 copy_to_kernel_nofault_loop(dst, src, size, u64, Efault);
75 copy_to_kernel_nofault_loop(dst, src, size, u32, Efault);
77 copy_to_kernel_nofault_loop(dst, src, size, u16, Efault);
78 copy_to_kernel_nofault_loop(dst, src, size, u8, Efault);
87 long strncpy_from_kernel_nofault(char *dst, const void *unsafe_addr, long count)
98 __get_kernel_nofault(dst, src, u8, Efault);
99 dst++;
101 } while (dst[-1] && src - unsafe_addr < count);
104 dst[-1] = '\0';
108 dst[0] = '\0';
114 * @dst: pointer to the buffer that shall take the data
118 * Safely read from user address @src to the buffer at @dst. If a kernel fault
121 long copy_from_user_nofault(void *dst, const void __user *src, size_t size)
132 ret = __copy_from_user_inatomic(dst, src, size);
143 * @dst: address to write to
147 * Safely write to address @dst from the buffer at @src. If a kernel fault
150 long copy_to_user_nofault(void __user *dst, const void *src, size_t size)
154 if (access_ok(dst, size)) {
156 ret = __copy_to_user_inatomic(dst, src, size);
169 * @dst: Destination address, in kernel space. This buffer must be at
182 * sets the last byte of @dst buffer to NUL and returns @count.
184 long strncpy_from_user_nofault(char *dst, const void __user *unsafe_addr,
193 ret = strncpy_from_user(dst, unsafe_addr, count);
198 dst[ret - 1] = '\0';