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:	Thu, 3 Jan 2008 11:47:54 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Andi Kleen <ak@...e.de>
Cc:	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] [5/20] x86: Introduce nsec_barrier()


* Andi Kleen <ak@...e.de> wrote:

> nsec_barrier() is a new barrier primitive that stops RDTSC speculation 
> to avoid races with timer interrupts on other CPUs.
> 
> Add it to all architectures. Except for x86 it is a nop right now. I 
> only tested x86, but it's a very simple change.
> 
> On x86 it expands either to LFENCE (for Intel CPUs) or MFENCE (for AMD 
> CPUs) which stops RDTSC on all currently known microarchitectures that 
> implement SSE. On CPUs without SSE there is generally no RDTSC 
> speculation.

i've picked up your rdtsc patches into x86.git but have simplified it: 
there's no nsec_barrier() anymore - rdtsc() is always synchronous. 
MFENCE/LFENCE is fast enough. Open-coding such barriers almost always 
leads to needless trouble. Please check the next x86.git tree.

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