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:	Tue, 3 Sep 2013 21:56:25 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	paulmck@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>
Subject: Re: [RFC][PATCH 01/18 v2] ftrace: Add hash list to save RCU unsafe
 functions

On Tue, 3 Sep 2013 21:51:52 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:
 
> > >  void ftrace_unsafe_rcu_checker_disable(void)
> > >  {
> > >  	atomic_inc(&ftrace_unsafe_rcu_disabled);
> > > +	/* Make sure the update is seen immediately */
> > > +	smp_wmb();
> > 
> > 	smp_mb__after_atomic_inc()?
> 
> Yep.
> 
> > 
> > >  }
> > > 
> > >  void ftrace_unsafe_rcu_checker_enable(void)
> > >  {
> > >  	atomic_dec(&ftrace_unsafe_rcu_disabled);
> > > +	/* Make sure the update is seen immediately */
> > > +	smp_wmb();
> > 
> > 	smp_mb__after_atomic_dec()?
> 
> Yep.
> 
> > 
> > >  }
> > > 
> > >  static DEFINE_PER_CPU(unsigned long, ftrace_rcu_func);
> > > @@ -588,15 +593,14 @@ static void
> > >  ftrace_unsafe_callback(unsigned long ip, unsigned long parent_ip,
> > >  		       struct ftrace_ops *op, struct pt_regs *pt_regs)
> > >  {
> > > -	int bit;
> > > -
> > > +	/* Make sure we see disabled or not first */
> > > +	smp_rmb();
> > 
> > 	smp_mb__before_atomic_inc()?
> 
> Yep.
> 
> I'll update it and restart my tests.
> 

Although, this will punish archs that need the mb(), as IIUC, smp_mb()
is heavier weight than smp_wmb() or smp_rmb().

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ