diff options
Diffstat (limited to 'include/linux/uaccess.h')
| -rw-r--r-- | include/linux/uaccess.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h index 975c963e5789..fec6decfb983 100644 --- a/include/linux/uaccess.h +++ b/include/linux/uaccess.h | |||
| @@ -84,4 +84,26 @@ static inline unsigned long __copy_from_user_nocache(void *to, | |||
| 84 | ret; \ | 84 | ret; \ |
| 85 | }) | 85 | }) |
| 86 | 86 | ||
| 87 | /* | ||
| 88 | * probe_kernel_read(): safely attempt to read from a location | ||
| 89 | * @dst: pointer to the buffer that shall take the data | ||
| 90 | * @src: address to read from | ||
| 91 | * @size: size of the data chunk | ||
| 92 | * | ||
| 93 | * Safely read from address @src to the buffer at @dst. If a kernel fault | ||
| 94 | * happens, handle that and return -EFAULT. | ||
| 95 | */ | ||
| 96 | extern long probe_kernel_read(void *dst, void *src, size_t size); | ||
| 97 | |||
| 98 | /* | ||
| 99 | * probe_kernel_write(): safely attempt to write to a location | ||
| 100 | * @dst: address to write to | ||
| 101 | * @src: pointer to the data that shall be written | ||
| 102 | * @size: size of the data chunk | ||
| 103 | * | ||
| 104 | * Safely write to address @dst from the buffer at @src. If a kernel fault | ||
| 105 | * happens, handle that and return -EFAULT. | ||
| 106 | */ | ||
| 107 | extern long probe_kernel_write(void *dst, void *src, size_t size); | ||
| 108 | |||
| 87 | #endif /* __LINUX_UACCESS_H__ */ | 109 | #endif /* __LINUX_UACCESS_H__ */ |
