linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] kprobes: Remove kprobe::fault_handler
@ 2021-05-25  7:25 Peter Zijlstra
  2021-05-25  7:25 ` [PATCH 1/2] " Peter Zijlstra
  2021-05-25  7:25 ` [PATCH 2/2] x86,kprobes: WARN if kprobes tries to handle a fault Peter Zijlstra
  0 siblings, 2 replies; 13+ messages in thread
From: Peter Zijlstra @ 2021-05-25  7:25 UTC (permalink / raw)
  To: mhiramat; +Cc: linux-kernel, peterz, mingo, rostedt, naveen.n.rao, ananth, x86

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.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-06-04 13:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25  7:25 [PATCH 0/2] kprobes: Remove kprobe::fault_handler Peter Zijlstra
2021-05-25  7:25 ` [PATCH 1/2] " Peter Zijlstra
2021-05-25 14:06   ` Masami Hiramatsu
2021-05-26 10:50   ` Naveen N. Rao
2021-05-26 13:51     ` Masami Hiramatsu
2021-06-01 12:01   ` [PATCH] kprobes: Do not increment probe miss count in the fault handler Naveen N. Rao
2021-06-01 13:20     ` Peter Zijlstra
2021-06-01 23:48       ` Masami Hiramatsu
2021-06-04 13:38     ` [tip: perf/core] " tip-bot2 for Naveen N. Rao
2021-06-01 14:04   ` [tip: perf/core] kprobes: Remove kprobe::fault_handler tip-bot2 for Peter Zijlstra
2021-05-25  7:25 ` [PATCH 2/2] x86,kprobes: WARN if kprobes tries to handle a fault Peter Zijlstra
2021-05-25 14:21   ` Masami Hiramatsu
2021-06-01 14:04   ` [tip: perf/core] " tip-bot2 for Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).