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: <20190620212035.GY26519@linux.ibm.com>
Date:   Thu, 20 Jun 2019 14:20:35 -0700
From:   "Paul E. McKenney" <paulmck@...ux.ibm.com>
To:     Scott Wood <swood@...hat.com>
Cc:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Juri Lelli <juri.lelli@...hat.com>,
        Clark Williams <williams@...hat.com>,
        linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RT 1/4] rcu: Acquire RCU lock when disabling BHs

On Thu, Jun 20, 2019 at 04:06:02PM -0500, Scott Wood wrote:
> On Thu, 2019-06-20 at 13:53 -0700, Paul E. McKenney wrote:
> > On Tue, Jun 18, 2019 at 08:19:05PM -0500, Scott Wood wrote:
> > > diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> > > index fb267bc04fdf..aca4e5e25ace 100644
> > > --- a/include/linux/rcupdate.h
> > > +++ b/include/linux/rcupdate.h
> > > @@ -637,10 +637,12 @@ static inline void rcu_read_unlock(void)
> > >  static inline void rcu_read_lock_bh(void)
> > >  {
> > >  	local_bh_disable();
> > > +#ifndef CONFIG_PREEMPT_RT_FULL
> > 
> > How about this instead?
> > 
> > 	if (IS_ENABLED(CONFIG_PREEMPT_RT_FULL))
> > 		return;
> 
> OK.
> 
> > > @@ -189,8 +193,10 @@ void __local_bh_enable_ip(unsigned long ip,
> > > unsigned int cnt)
> > >  	WARN_ON_ONCE(count < 0);
> > >  	local_irq_enable();
> > >  
> > > -	if (!in_atomic())
> > > +	if (!in_atomic()) {
> > > +		rcu_read_unlock();
> > >  		local_unlock(bh_lock);
> > > +	}
> > >  
> > >  	preempt_check_resched();
> > >  }
> > 
> > And I have to ask...
> > 
> > What did you do to test this change to kernel/softirq.c?  My past attempts
> > to do this sort of thing have always run afoul of open-coded BH
> > transitions.
> 
> Mostly rcutorture and loads such as kernel builds, on a debug kernel.  By
> "open-coded BH transition" do you mean directly manipulating the preempt
> count?  That would already be broken on RT.

OK, then maybe you guys have already done the needed cleanup work.  Cool!

But don't the additions of rcu_read_lock() and rcu_read_unlock() want
to be protected by "!IS_ENABLED(CONFIG_PREEMPT_RT_FULL)" or similar?

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ