Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

From: Masami Hiramatsu
Date: Mon Sep 07 2020 - 22:55:41 EST


On Mon, 07 Sep 2020 13:44:19 -0400
fche@xxxxxxxxxx (Frank Ch. Eigler) wrote:

> Masami Hiramatsu <mhiramat@xxxxxxxxxx> writes:
>
> > Sorry, for noticing this point, I Cc'd to systemtap. Is systemtap taking
> > care of spinlock too?
>
> On PRREMPT_RT configurations, systemtap uses the raw_spinlock_t
> types/functions, to keep its probe handlers as atomic as we can make them.

OK, if the lock is only used in the probe handlers, there should be
no problem. Even if a probe hits in the NMI which happens in another
kprobe handler, the probe does not call its handler (because we don't
support nested kprobes* yet).
But maybe you'll get warnings if you enable the lockdep.

* https://lkml.kernel.org/r/158894789510.14896.13461271606820304664.stgit@devnote2
It seems that we need more work for the nested kprobes.

Thank you,

--
Masami Hiramatsu <mhiramat@xxxxxxxxxx>