Skip to content

kprobes: Remove kprobe::fault_handler

Peter Zijlstra lkml 1 version Applied

Status from this message: The following commit has been merged into the perf/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2kprobes: Remove kprobe::fault_handlerDocumentation/trace/kprobes.rst arch/arc/kernel/kprobes.c arch/arm/probes/kprobes/core.c +13 more+5 -1726 replies
2/2x86,kprobes: WARN if kprobes tries to handle a faultarch/x86/mm/fault.c+2 -21 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchChristoph HellwigMasami Hiramatsu
1/2R-b A-b A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] 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.

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