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: <53126581.1090407@zytor.com>
Date:	Sat, 01 Mar 2014 14:56:01 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Andy Lutomirski <luto@...capital.net>,
	Stefani Seibold <stefani@...bold.net>
CC:	Greg KH <gregkh@...uxfoundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	X86 ML <x86@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Andi Kleen <ak@...ux.intel.com>,
	Andrea Arcangeli <aarcange@...hat.com>,
	John Stultz <john.stultz@...aro.org>,
	Pavel Emelyanov <xemul@...allels.com>,
	Cyrill Gorcunov <gorcunov@...nvz.org>,
	andriy.shevchenko@...ux.intel.com, Martin.Runge@...de-schwarz.com,
	Andreas.Brief@...de-schwarz.com
Subject: Re: Final: Add 32 bit VDSO time function support

On 02/28/2014 06:00 PM, Andy Lutomirski wrote:
> 
> This leads to a potentially interesting question: is rdtsc_barrier()
> actually necessary on UP?  IIRC the point is that, if an
> rdtsc_barrier(); rdtsc in one thread is "before" (in the sense of
> being synchronized by some memory operation) an rdtsc_barrier(); rdtsc
> in another thread, then the first rdtsc needs to return an earlier or
> equal time to the second one.
> 
> I assume that no UP CPU is silly enough to execute two rdtsc
> instructions out of order relative to each other in the absence of
> barriers.  So this is a nonissue on UP.
> 
> On the other hand, suppose that some code does:
> 
> volatile long x = *(something that's not in cache)
> clock_gettime
> 
> I can imagine a modern CPU speculating far enough ahead that the rdtsc
> happens *before* the cache miss.  This won't cause visible
> non-monotonicity as far as I can see, but it might annoy people who
> try to benchmark their code.
> 
> Note: actually making this change might be a bit tricky.  I don't know
> if the alternatives code is smart enough.
> 

Let's put it this way... this is at best a third-order optimization...
let's not worry about it right now.

	-hpa


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