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: <20150709142115.GZ3717@linux.vnet.ibm.com>
Date:	Thu, 9 Jul 2015 07:21:16 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org, mingo@...nel.org,
	laijs@...fujitsu.com, dipankar@...ibm.com,
	akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
	josh@...htriplett.org, tglx@...utronix.de, rostedt@...dmis.org,
	dhowells@...hat.com, edumazet@...gle.com, dvhart@...ux.intel.com,
	fweisbec@...il.com, oleg@...hat.com, bobby.prani@...il.com
Subject: Re: [PATCH RFC tip/core/rcu 05/14] rcu: Abstract sequence counting
 from synchronize_sched_expedited()

On Thu, Jul 09, 2015 at 11:42:49AM +0300, Dan Carpenter wrote:
> On Wed, Jul 01, 2015 at 03:18:04PM -0700, Paul E. McKenney wrote:
> > > > +/* Adjust sequence number for start of update-side operation. */
> > > > +static void rcu_seq_start(unsigned long *sp)
> > > > +{
> > > > +	WRITE_ONCE(*sp, *sp + 1);
> > > > +	smp_mb(); /* Ensure update-side operation after counter increment. */
> > > > +	WARN_ON_ONCE(!(*sp & 0x1));
> > > > +}
> > > 
> > > That wants to be an ACQUIRE, right?
> > 
> > I cannot put the acquire in the WARN_ON_ONCE() because there
> > are configurations where WARN_ON_ONCE() is compiled out.
> 
> I think WARN_ON_ONCE() always evaulates the condition.  You are maybe
> thinking of VM_WARN_ON_ONCE().

Even if it happens to now, it is only a matter of time until the
tinification people make it optional.

> I'm on a different thread where we almost introduced a bug by using
> VM_WARN_ONCE() instead of WARN_ONCE().  The VM_WARNING conditions had
> long execute times so they are weird.

New one on me!  At first glance, they look like they map pretty
directly, though.

							Thanx, Paul

--
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