Re: [PATCH 2/3] livepatch/rcu: Warn when system consistency is broken in RCU code

From: Steven Rostedt
Date: Mon May 08 2017 - 17:16:56 EST


On Mon, 8 May 2017 15:43:33 -0500
Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:

> Ok, so just to clarify. Is there a bug in the ftrace stack tracer in
> the following situation?
>
> 1. RCU isn't watching
> 2. An NMI hits
> 3. ist_enter() calls into the ftrace stack tracer, before
> rcu_nmi_enter() is called, so RCU isn't watching yet

No, because in the ftrace stack tracer there's:

if (in_nmi())
return;

At the very beginning.

-- Steve

> 4. The ftrace stack tracer calls rcu_irq_enter(), which has no effect,
> so RCU still isn't watching
> 5. Hilarity ensues in the ftrace stack tracer
>