[PATCH 0/2] kprobes: Remove kprobe::fault_handler

From: Peter Zijlstra
Date: Tue May 25 2021 - 03:33:52 EST


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.

The corollary of this change is that no tracing/probing/whatever can consume
faults.