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]
Date:	Fri, 20 Dec 2013 09:47:10 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	hpa@...or.com, linux-kernel@...r.kernel.org,
	torvalds@...ux-foundation.org, tglx@...utronix.de,
	hpa@...ux.intel.com, len.brown@...el.com,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/idle] x86, idle: Use static_cpu_has() for CLFLUSH
 workaround, add barriers


* Peter Zijlstra <peterz@...radead.org> wrote:

> On Thu, Dec 19, 2013 at 09:40:51PM +0100, Ingo Molnar wrote:
> > > +		if (static_cpu_has(X86_FEATURE_CLFLUSH_MONITOR)) {
> > > +			mb();
> > >  			clflush((void *)&current_thread_info()->flags);
> > > +			mb();
> > > +		}
> 
> >  	if (!current_set_polling_and_test()) {
> >  		if (static_cpu_has(X86_FEATURE_CLFLUSH_MONITOR)) {
> > -			mb();
> > +			/*
> > +			 * There's no need for an extra barrier here: current_set_polling_and_test()
> > +			 * already has an smp_mb() after ->flags gets modified, see sched.h.
> > +			 */
> >  			clflush((void *)&current_thread_info()->flags);
> >  			mb();
> >  		}
> 
> So almost, except that smp_mb() will disappear on an UP kernel whereas
> this errata might just always need the MFENCE.

Yeah. Sigh, so I noticed that and even thought through the UP case and 
concluded: on UP the race cannot happen - which is bogus. Yesterday 
was so much fail, maybe today's a better day ;-)

Thanks,

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