[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180907100128.64e08130@gandalf.local.home>
Date: Fri, 7 Sep 2018 10:01:28 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH] printk/tracing: Do not trace printk_nmi_enter()
On Fri, 7 Sep 2018 09:55:33 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:
> On Fri, 7 Sep 2018 15:45:32 +0200
> Peter Zijlstra <peterz@...radead.org> wrote:
>
> > Yes really, we should not muck with the IRQ state from NMI context.
>
> Right, and we didn't. Your patch didn't change anything, but allow for
> printk_nmi_enter/exit() to be traced by ftrace, but that's wrong to
> begin with because it ftrace_nmi_enter() hasn't been called yet.
>
I would even argue that placing printk_nmi_enter() between
lockdep_off() and ftrace_nmi_enter() is wrong because if in the future
printk_nmi_enter() were to do any ftrace tracing, it wont be caught, as
it was by having it before lockdep_off().
printk_nmi_enter() should not muck with IRQ state, nor should it do any
ftrace tracing. Since ftrace mucks with IRQ state when it gets enabled
or disabled, it will screw up lockdep, and lockdep will complain. That
way we can use lockdep not being off to catch this bug.
-- Steve
Powered by blists - more mailing lists