[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190107145918.407b851b@gandalf.local.home>
Date: Mon, 7 Jan 2019 14:59:18 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Andrea Righi <righi.andrea@...il.com>
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
Ingo Molnar <mingo@...hat.com>, peterz@...radead.org,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/2] kprobes: Fix kretprobe incorrect stacking order
problem
On Mon, 7 Jan 2019 20:52:09 +0100
Andrea Righi <righi.andrea@...il.com> wrote:
> > Ug, kretprobe calls spinlocks in the callback? I wonder if we can
> > remove them.
> >
> > I'm guessing this is a different issue than the one that this patch
> > fixes. This sounds like we are calling kretprobe from kretprobe?
> >
> > -- Steve
>
> kretprobe_trampoline()
> -> trampoline_handler()
> -> kretprobe_hash_lock()
> -> raw_spin_lock_irqsave()
>
> If we put a kretprobe to raw_spin_lock_irqsave() it looks like
> kretprobe is going to call kretprobe...
Right, but we should be able to add some recursion protection to stop
that. I have similar protection in the ftrace code.
-- Steve
Powered by blists - more mailing lists