All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip v3 0/7] kprobes/x86: Preempt related enhancements
@ 2017-09-19  9:58 Masami Hiramatsu
  2017-09-19  9:59 ` [PATCH -tip v3 1/7] kprobes: Improve smoke test to check preemptible Masami Hiramatsu
                   ` (7 more replies)
  0 siblings, 8 replies; 28+ messages in thread
From: Masami Hiramatsu @ 2017-09-19  9:58 UTC (permalink / raw)
  To: Ingo Molnar, mingo
  Cc: x86, Steven Rostedt, Masami Hiramatsu, linux-kernel,
	Peter Zijlstra, Ananth N Mavinakayanahalli, Thomas Gleixner,
	H . Peter Anvin, Paul E . McKenney, Alexei Starovoitov,
	Alexei Starovoitov

Hi,

Here is the 3rd version of the series to improve preempt
related behavior in kprobes/x86. This actually includes
many enhancements/fixes from the 2nd version, which is

https://lkml.org/lkml/2017/9/11/482

With the previous patch, lkp-bot reported that an issue
( https://lkml.org/lkml/2017/9/14/3 ) and I couldn't
reproduce it. However, I found a suspicious bug and fixed
it ([2/7]).

Also, while I was checking the correct condition for 
*probe handlers in Documentation/kprobes.txt, I also
found that current implementations for ftrace-based kprobe
and optprobe were mis-reading the document.
>From the document, handlers must be run with preempt-
disabled, but interrupt disabling is not guaranteed.
So in the middle of this series, patches ([4/7],[5/7],
[6/7]) adding preempt-disabling and removing irq-disabling.

And at last, I placed the original patch (Enable optprobe
with CONFIG_PREEMPT).

The others are just for making sure this fix works well.
- [1/7] is just adding preemptible checker in kprobe
  smake tests so that we can easily find mistake.
- [3/7] is adding an assert if user tries to change
  execution path in optprobe, which is obviously
  prohibited in the document (there also be how to
  avoid it.)

Thank you,

---

Masami Hiramatsu (7):
      kprobes: Improve smoke test to check preemptible
      kprobes/x86: Move get_kprobe_ctlblk in irq-disabled block
      kprobes: Warn if optprobe handler tries to change execution path
      kprobes/x86: Disable preempt in optprobe
      kprobes/x86: Disable preempt ftrace-based jprobe
      kprobes/x86: Remove disable_irq from ftrace-based/optimized kprobe
      kprobes: Use synchronize_rcu_tasks() for optprobe with CONFIG_PREEMPT


 arch/Kconfig                     |    2 +-
 arch/x86/kernel/kprobes/ftrace.c |   32 ++++++++++++++++----------------
 arch/x86/kernel/kprobes/opt.c    |    8 +++-----
 kernel/kprobes.c                 |   23 +++++++++++++++++------
 kernel/test_kprobes.c            |   20 ++++++++++++++++++++
 5 files changed, 57 insertions(+), 28 deletions(-)

--
Masami Hiramatsu

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

end of thread, other threads:[~2017-10-17  8:06 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-19  9:58 [PATCH -tip v3 0/7] kprobes/x86: Preempt related enhancements Masami Hiramatsu
2017-09-19  9:59 ` [PATCH -tip v3 1/7] kprobes: Improve smoke test to check preemptible Masami Hiramatsu
2017-09-28 10:52   ` [tip:perf/core] kprobes: Improve smoke test to check preemptibility tip-bot for Masami Hiramatsu
2017-09-19  9:59 ` [PATCH -tip v3 2/7] kprobes/x86: Move get_kprobe_ctlblk in irq-disabled block Masami Hiramatsu
2017-09-28 10:52   ` [tip:perf/core] kprobes/x86: Move the get_kprobe_ctlblk() into " tip-bot for Masami Hiramatsu
2017-09-19 10:00 ` [PATCH -tip v3 3/7] kprobes: Warn if optprobe handler tries to change execution path Masami Hiramatsu
2017-09-28 10:53   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2017-10-10 17:02   ` [PATCH -tip v3 3/7] " Naveen N. Rao
2017-10-12  5:04     ` Masami Hiramatsu
2017-10-17  8:05       ` Naveen N. Rao
2017-09-19 10:00 ` [PATCH -tip v3 4/7] kprobes/x86: Disable preempt in optprobe Masami Hiramatsu
2017-09-28 10:53   ` [tip:perf/core] kprobes/x86: Disable preemption " tip-bot for Masami Hiramatsu
2017-09-19 10:01 ` [PATCH -tip v3 5/7] kprobes/x86: Disable preempt ftrace-based jprobe Masami Hiramatsu
2017-09-28 10:54   ` [tip:perf/core] kprobes/x86: Disable preemption in ftrace-based jprobes tip-bot for Masami Hiramatsu
2017-09-19 10:02 ` [PATCH -tip v3 6/7] kprobes/x86: Remove disable_irq from ftrace-based/optimized kprobe Masami Hiramatsu
2017-09-28  7:25   ` Ingo Molnar
2017-09-29  6:48     ` Masami Hiramatsu
2017-09-28 10:54   ` [tip:perf/core] kprobes/x86: Remove IRQ disabling from ftrace-based/optimized kprobes tip-bot for Masami Hiramatsu
2017-09-19 10:03 ` [PATCH -tip v3 7/7] kprobes: Use synchronize_rcu_tasks() for optprobe with CONFIG_PREEMPT Masami Hiramatsu
2017-09-28  7:22   ` Ingo Molnar
2017-09-29  7:29     ` Masami Hiramatsu
2017-09-29  7:37       ` Ingo Molnar
2017-09-29 14:44         ` Masami Hiramatsu
2017-09-29 17:45           ` Ingo Molnar
2017-09-30  5:12             ` Masami Hiramatsu
2017-10-03 23:57       ` Steven Rostedt
2017-10-04 14:01         ` Masami Hiramatsu
2017-09-21 22:00 ` [PATCH -tip v3 0/7] kprobes/x86: Preempt related enhancements Alexei Starovoitov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.