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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190424185642.GS3923@linux.ibm.com>
Date:   Wed, 24 Apr 2019 11:56:42 -0700
From:   "Paul E. McKenney" <paulmck@...ux.ibm.com>
To:     Oleg Nesterov <oleg@...hat.com>
Cc:     Peter Zijlstra <peterz@...radead.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rcu/sync: kill rcu_sync_type/gp_type

On Wed, Apr 24, 2019 at 01:37:04PM +0200, Oleg Nesterov wrote:
> On 04/23, Paul E. McKenney wrote:
> >
> > I wordsmithed the commit log and merged in the RCU-bh and RCU checks
> > to rcu_sync_is_idle(), with the result shown below.  Does that work
> > OK, or did I mess something up?
> 
> Yes, thanks!
> 
> the additional RCU-bh and RCU checks matches the "or introduce rcu_read_lock_any_held()"
> note from the changelog, perhaps it makes some sense...
> 
> Just one nit below,
> 
> > - * Must be invoked within an RCU read-side critical section whose
> > - * flavor matches that of the rcu_sync struture.
> > + * Must be invoked within an RCU-sched read-side critical section.
>                                 ^^^^^^^^^
> 
> Given that the actual code:
> 
> >  static inline bool rcu_sync_is_idle(struct rcu_sync *rsp)
> >  {
> > -#ifdef CONFIG_PROVE_RCU
> > -	rcu_sync_lockdep_assert(rsp);
> > -#endif
> > +	RCU_LOCKDEP_WARN(!rcu_read_lock_held() &&
> > +			 !rcu_read_lock_bh_held() &&
> > +			 !rcu_read_lock_sched_held(),
> > +			 "suspicious rcu_sync_is_idle() usage");
> 
> does RCU_LOCKDEP_WARN(!rcu_read_lock_any()) the comment should say
> 
> 	Must be invoked within an RCU read-side critical section of
> 	any flavor

Good catch, thank you!  I went with this:

* Must be invoked within some flavor of RCU read-side critical section.

Does that work for you?

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ