diff options
Diffstat (limited to 'include/linux/uaccess.h')
-rw-r--r-- | include/linux/uaccess.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h index 5a43ef7db492..9c435c3f2105 100644 --- a/include/linux/uaccess.h +++ b/include/linux/uaccess.h | |||
@@ -243,6 +243,17 @@ extern long probe_kernel_read(void *dst, const void *src, size_t size); | |||
243 | extern long __probe_kernel_read(void *dst, const void *src, size_t size); | 243 | extern long __probe_kernel_read(void *dst, const void *src, size_t size); |
244 | 244 | ||
245 | /* | 245 | /* |
246 | * probe_user_read(): safely attempt to read from a location in user space | ||
247 | * @dst: pointer to the buffer that shall take the data | ||
248 | * @src: address to read from | ||
249 | * @size: size of the data chunk | ||
250 | * | ||
251 | * Safely read from address @src to the buffer at @dst. If a kernel fault | ||
252 | * happens, handle that and return -EFAULT. | ||
253 | */ | ||
254 | extern long probe_user_read(void *dst, const void __user *src, size_t size); | ||
255 | |||
256 | /* | ||
246 | * probe_kernel_write(): safely attempt to write to a location | 257 | * probe_kernel_write(): safely attempt to write to a location |
247 | * @dst: address to write to | 258 | * @dst: address to write to |
248 | * @src: pointer to the data that shall be written | 259 | * @src: pointer to the data that shall be written |
@@ -255,6 +266,9 @@ extern long notrace probe_kernel_write(void *dst, const void *src, size_t size); | |||
255 | extern long notrace __probe_kernel_write(void *dst, const void *src, size_t size); | 266 | extern long notrace __probe_kernel_write(void *dst, const void *src, size_t size); |
256 | 267 | ||
257 | extern long strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count); | 268 | extern long strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count); |
269 | extern long strncpy_from_unsafe_user(char *dst, const void __user *unsafe_addr, | ||
270 | long count); | ||
271 | extern long strnlen_unsafe_user(const void __user *unsafe_addr, long count); | ||
258 | 272 | ||
259 | /** | 273 | /** |
260 | * probe_kernel_address(): safely attempt to read from a location | 274 | * probe_kernel_address(): safely attempt to read from a location |