kprobes: Remove kprobe::fault_handler
authorPeter Zijlstra <peterz@infradead.org>
Tue, 25 May 2021 07:25:19 +0000 (09:25 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 1 Jun 2021 14:00:08 +0000 (16:00 +0200)
commitec6aba3d2be1ed75b3f4c894bb64a36d40db1f55
tree0fd56814090efcd59ce2f2b29906043853764b23
parent9ce4d216fe8b581e4da4406461a4cfc9acbfa679
kprobes: Remove kprobe::fault_handler

The reason for kprobe::fault_handler(), as given by their comment:

 * We come here because instructions in the pre/post
 * handler caused the page_fault, this could happen
 * if handler tries to access user space by
 * copy_from_user(), get_user() etc. Let the
 * user-specified handler try to fix it first.

Is just plain bad. Those other handlers are ran from non-preemptible
context and had better use _nofault() functions. Also, there is no
upstream usage of this.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20210525073213.561116662@infradead.org
16 files changed:
Documentation/trace/kprobes.rst
arch/arc/kernel/kprobes.c
arch/arm/probes/kprobes/core.c
arch/arm64/kernel/probes/kprobes.c
arch/csky/kernel/probes/kprobes.c
arch/ia64/kernel/kprobes.c
arch/mips/kernel/kprobes.c
arch/powerpc/kernel/kprobes.c
arch/riscv/kernel/probes/kprobes.c
arch/s390/kernel/kprobes.c
arch/sh/kernel/kprobes.c
arch/sparc/kernel/kprobes.c
arch/x86/kernel/kprobes/core.c
include/linux/kprobes.h
kernel/kprobes.c
samples/kprobes/kprobe_example.c