summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorMasami Hiramatsu2019-05-15 07:38:18 +0200
committerSteven Rostedt (VMware)2019-05-26 05:04:42 +0200
commit3d7081822f7f9eab867d9bcc8fd635208ec438e0 (patch)
tree8afb5e61c1f23305996d4a8e03dedd7c048de01d /kernel/trace
parentx86/uaccess: Allow access_ok() in irq context if pagefault_disabled (diff)
downloadkernel-qcow2-linux-3d7081822f7f9eab867d9bcc8fd635208ec438e0.tar.gz
kernel-qcow2-linux-3d7081822f7f9eab867d9bcc8fd635208ec438e0.tar.xz
kernel-qcow2-linux-3d7081822f7f9eab867d9bcc8fd635208ec438e0.zip
uaccess: Add non-pagefault user-space read functions
Add probe_user_read(), strncpy_from_unsafe_user() and strnlen_unsafe_user() which allows caller to access user-space in IRQ context. Current probe_kernel_read() and strncpy_from_unsafe() are not available for user-space memory, because it sets KERNEL_DS while accessing data. On some arch, user address space and kernel address space can be co-exist, but others can not. In that case, setting KERNEL_DS means given address is treated as a kernel address space. Also strnlen_user() is only available from user context since it can sleep if pagefault is enabled. To access user-space memory without pagefault, we need these new functions which sets USER_DS while accessing the data. Link: http://lkml.kernel.org/r/155789869802.26965.4940338412595759063.stgit@devnote2 Acked-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
0 files changed, 0 insertions, 0 deletions