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] [day] [month] [year] [list]
Message-ID: <ZRWzQ5Fiav8aCYhj@boqun-archlinux>
Date:   Thu, 28 Sep 2023 10:09:23 -0700
From:   Boqun Feng <boqun.feng@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        linux-kernel@...r.kernel.org, rcu@...r.kernel.org,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Frederic Weisbecker <frederic@...nel.org>,
        Ingo Molnar <mingo@...hat.com>,
        Joel Fernandes <joel@...lfernandes.org>,
        John Ogness <john.ogness@...utronix.de>,
        Josh Triplett <josh@...htriplett.org>,
        Lai Jiangshan <jiangshanlai@...il.com>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Neeraj Upadhyay <quic_neeraju@...cinc.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Waiman Long <longman@...hat.com>,
        Will Deacon <will@...nel.org>,
        Zqiang <qiang.zhang1211@...il.com>
Subject: Re: [RFC PATCH] srcu: Use try-lock lockdep annotation for NMI-safe
 access.

On Thu, Sep 28, 2023 at 05:29:42PM +0200, Peter Zijlstra wrote:
> On Thu, Sep 28, 2023 at 07:54:10AM -0700, Boqun Feng wrote:
> > On Thu, Sep 28, 2023 at 10:09:00AM +0200, Peter Zijlstra wrote:
> > > On Wed, Sep 27, 2023 at 11:06:09PM -0700, Boqun Feng wrote:
> > > 
> > > > I think this is a "side-effect" of commit f0f44752f5f6 ("rcu: Annotate
> > > > SRCU's update-side lockdep dependencies"). In verify_lock_unused(), i.e.
> > > > the checking for NMI lock usages, the logic is that
> > > 
> > > I think I'm having a problem with this commit -- that is, by adding
> > > lockdep you're adding tracepoint, which rely on RCU being active.
> > > 
> > > The result is that SRCU is now no longer usable from !RCU regions.
> > > 
> > 
> > Interesting
> > 
> > > Was this considered and intended?
> > > 
> > 
> > No, I don't think I have considered this before, I think I may still
> > miss something here, maybe you or Paul can provide an example for such
> > a case?
> 
> The whole trace_.*_rcuidle() machinery. Which I thought I had fully
> eradicated, but apparently still exists (with *one* user) :-/
> 
> Search for rcuidle in include/linux/tracepoint.h
> 
> Also, git grep trace_.*_rcuidle
> 

Thanks! But as I mentioned in the IRC, trace_.*_rcuidle() call the
special APIs srcu_read_{un,}lock_notrace(), and these won't call lockdep
annotation functions. And what the commit did was only changing the
lockdep annotation of srcu_read_{un,}lock(), so we are still fine here?

Regards,
Boqun

> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ