[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200903110226.8963179e6a7c978e2d56c595@kernel.org>
Date: Thu, 3 Sep 2020 11:02:26 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Masami Hiramatsu <mhiramat@...nel.org>
Cc: peterz@...radead.org, Ingo Molnar <mingo@...nel.org>,
linux-kernel@...r.kernel.org, Eddy_Wu@...ndmicro.com,
x86@...nel.org, davem@...emloft.net, rostedt@...dmis.org,
naveen.n.rao@...ux.ibm.com, anil.s.keshavamurthy@...el.com,
linux-arch@...r.kernel.org, cameron@...dycamel.com,
oleg@...hat.com, will@...nel.org, paulmck@...nel.org,
systemtap@...rceware.org
Subject: Re: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers
and make kretprobe lockless
On Thu, 3 Sep 2020 10:39:54 +0900
Masami Hiramatsu <mhiramat@...nel.org> wrote:
> OK, I've confirmed that the lockdep warns on kretprobe from INT3
> with your fix. Of course make it lockless then warning is gone.
> But even without the lockless patch, this warning can be false-positive
> because we prohibit nested kprobe call, right?
>
> If the kprobe user handler uses a spinlock, the spinlock is used
> only in that handler (and in the context between kprobe_busy_begin/end),
> it will be safe since the spinlock is not nested.
> But if the spinlock is shared with other context, it will be dangerous
> because it can be interrupted by NMI (including INT3). This also applied
> to the function which is called from kprobe user handlers, thus user
> has to take care of it.
Sorry, for noticing this point, I Cc'd to systemtap. Is systemtap taking
care of spinlock too?
Thank you,
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists