aboutsummaryrefslogtreecommitdiff
path: root/mm/maccess.c
diff options
context:
space:
mode:
authorGravatar Christoph Hellwig <hch@lst.de> 2020-06-08 21:34:40 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org> 2020-06-09 09:39:15 -0700
commit8d92db5c04d10381f4db70ed99b1b576f5db18a7 (patch)
tree51334cc23b1f21ace2bb70f43eb604d86ad19ce7 /mm/maccess.c
parentbpf:bpf_seq_printf(): handle potentially unsafe format string better (diff)
downloadlinux-8d92db5c04d10381f4db70ed99b1b576f5db18a7.tar.gz
linux-8d92db5c04d10381f4db70ed99b1b576f5db18a7.tar.bz2
linux-8d92db5c04d10381f4db70ed99b1b576f5db18a7.zip
bpf: rework the compat kernel probe handling
Instead of using the dangerous probe_kernel_read and strncpy_from_unsafe helpers, rework the compat probes to check if an address is a kernel or userspace one, and then use the low-level kernel or user probe helper shared by the proper kernel and user probe helpers. This slightly changes behavior as the compat probe on a user address doesn't check the lockdown flags, just as the pure user probes do. 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-14-hch@lst.de Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/maccess.c')
0 files changed, 0 insertions, 0 deletions