]> git.baikalelectronics.ru Git - kernel.git/commit
maccess: always use strict semantics for probe_kernel_read
authorChristoph Hellwig <hch@lst.de>
Tue, 9 Jun 2020 04:34:50 +0000 (21:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Jun 2020 16:39:15 +0000 (09:39 -0700)
commitd92dffb7a7b25e38a26add604d759ea8b70cb676
tree8cf32f92fccd8cd5264434d42fa68dcba4c2ab3c
parentc643384ca947f26e9138425cae64b186add973b3
maccess: always use strict semantics for probe_kernel_read

Except for historical confusion in the kprobes/uprobes and bpf tracers,
which has been fixed now, there is no good reason to ever allow user
memory accesses from probe_kernel_read.  Switch probe_kernel_read to only
read from kernel memory.

[akpm@linux-foundation.org: update it for "mm, dump_page(): do not crash with invalid mapping pointer"]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20200521152301.2587579-17-hch@lst.de
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/parisc/lib/memcpy.c
arch/um/kernel/maccess.c
arch/x86/mm/maccess.c
include/linux/uaccess.h
kernel/trace/bpf_trace.c
kernel/trace/trace_kprobe.c
mm/debug.c
mm/maccess.c