lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 18 May 2017 10:04:38 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Miroslav Benes <mbenes@...e.cz>
Cc:     "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v2] tracing: Make sure RCU is watching before calling a
 stack trace

On Thu, 18 May 2017 15:48:55 +0200 (CEST)
Miroslav Benes <mbenes@...e.cz> wrote:

> On Thu, 18 May 2017, Steven Rostedt wrote:
> 
> > 
> > From: "Steven Rostedt (VMware)" <rostedt@...dmis.org>
> > 
> > As stack tracing now requires "rcu watching", force RCU to be watching when
> > recording a stack trace.
> > 
> > Link: http://lkml.kernel.org/r/20170512172449.879684501@goodmis.org
> > 
> > Cc: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
> > Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
> > ---
> > 
> > Changes since v1:
> > 
> >    My testing discovered that the stack trace can be called with
> >    interrupts enabled, which is a no no to have when calling
> >    rcu_irq_enter(). When interrupts are enabled, as with being in an
> >    NMI, RCU will also be watching.  
> 
> Would rcu_irq_enter_irqson() help then? This is what Petr used in a live 
> patching handler.
> 

Yes, that could work too, but I wanted to avoid disabling interrupts if
we didn't have to.

> Your solution works too, of course. Just asking if I am not missing 
> something.
>

Nope, I was just trying to keep the overhead down. As this can be
called by every event enabled, as well as functions being traced. I
figured that local_save_irqs() is faster than a pair of
local_irq_save()/ local_irq_restore() calls.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ