diff options
authorChristoph Hellwig <>2020-06-08 21:33:58 -0700
committerLinus Torvalds <>2020-06-09 09:39:15 -0700
commit0493cb086353e786be56010780a0b7025b5db34c (patch)
parentc1e8d7c6a7a682e1405e3e242d32fc377fd196ff (diff)
maccess: unexport probe_kernel_write()
Patch series "clean up and streamline probe_kernel_* and friends", v4. This series start cleaning up the safe kernel and user memory probing helpers in mm/maccess.c, and then allows architectures to implement the kernel probing without overriding the address space limit and temporarily allowing access to user memory. It then switches x86 over to this new mechanism by reusing the unsafe_* uaccess logic. This version also switches to the saner copy_{from,to}_kernel_nofault naming suggested by Linus. I kept the x86 helpers as-is without calling unsage_{get,put}_user as that avoids a number of hard to trace casts, and it will still work with the asm-goto based version easily. This patch (of 20): probe_kernel_write() is not used by any modular code. [ turns out that probe_user_write is used in modular code] Link: Signed-off-by: Christoph Hellwig <> Signed-off-by: Stephen Rothwell <> Signed-off-by: Andrew Morton <> Cc: Alexei Starovoitov <> Cc: Daniel Borkmann <> Cc: Masami Hiramatsu <> Cc: Ingo Molnar <> Cc: "H. Peter Anvin" <> Cc: Thomas Gleixner <> Link: Link: Signed-off-by: Linus Torvalds <>
1 files changed, 0 insertions, 1 deletions
diff --git a/mm/maccess.c b/mm/maccess.c
index 81df3b788284..a2b22295d8ea 100644
--- a/mm/maccess.c
+++ b/mm/maccess.c
@@ -121,7 +121,6 @@ long __probe_kernel_write(void *dst, const void *src, size_t size)
return ret;
* probe_user_write(): safely attempt to write to a user-space location