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]
Message-ID: <20190314123159.GB101545@google.com>
Date:   Thu, 14 Mar 2019 08:31:59 -0400
From:   Joel Fernandes <joel@...lfernandes.org>
To:     "Paul E. McKenney" <paulmck@...ux.ibm.com>
Cc:     Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
        rcu@...r.kernel.org, jiangshanlai@...il.com, dipankar@...ibm.com,
        mathieu.desnoyers@...icios.com, josh@...htriplett.org,
        luto@...nel.org, byungchul.park@....com
Subject: Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect
 half-interrupts

On Wed, Mar 13, 2019 at 11:07:30AM -0700, Paul E. McKenney wrote:
> On Wed, Mar 13, 2019 at 12:51:25PM -0400, Steven Rostedt wrote:
> > On Wed, 13 Mar 2019 08:51:55 -0700
> > "Paul E. McKenney" <paulmck@...ux.ibm.com> wrote:
> > 
> > > Does this mean that there is a better approach that Joel's suggestion?
> > > I believe he would end up with something like this:
> > > 
> > > 	WARN_ON_ONCE(IS_ENABLED(CONFIG_PROVE_RCU) && !in_irq());
> > > 
> > > It would be nice if there is something like this:
> > > 
> > > 	lockdep_assert_in_irq_handler();
> > > 
> > > But I haven't seen this.  (Not that I have looked particularly hard for
> > > such a thing, mind you!)
> > 
> > That would be trivial to implement:
> > 
> > #define lockdep_assert_in_irq() do {
> > 		WARN_ON(debug_locks && !current->hardirq_context);
> > 	} while (0)
> 
> Looks good to me!
> 
> Joel, does this work for you?  I could be wrong, but I suspect that Steve
> is suggesting that you incorporate the above into your eventual patch.  ;-)

Oh thanks for pointing that out. Yes it does work for me. I agree with the
lockdep API addition and others could benefit from it too. I will incorporate
the lockdep API addition into the RCU patch, but let me know if I should
rather split it.

thanks!

 - Joel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ