summaryrefslogtreecommitdiff
path: root/include/linux/iscsi_ibft.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2019-05-15 14:38:18 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-12 11:45:29 +0200
commit36fd2e474b0b66b1f091ac9438578381807e26e2 (patch)
tree62e129cb08d17873313b19608d213fe599de91d9 /include/linux/iscsi_ibft.h
parent39bb69d0617ef120b157b8f4f0563174bfc434a1 (diff)
uaccess: Add non-pagefault user-space read functions
[ Upstream commit 3d7081822f7f9eab867d9bcc8fd635208ec438e0 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/iscsi_ibft.h')
0 files changed, 0 insertions, 0 deletions