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: <487523B9.8040802@goop.org>
Date:	Wed, 09 Jul 2008 13:46:49 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Arjan van de Ven <arjan@...radead.org>
CC:	Ingo Molnar <mingo@...e.hu>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Mike Travis <travis@....com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Christoph Lameter <cl@...ux-foundation.org>,
	Jack Steiner <steiner@....com>, linux-kernel@...r.kernel.org
Subject: Re: [RFC 00/15] x86_64: Optimize percpu accesses

Arjan van de Ven wrote:
> what's wrong with zero based btw?
>   

Nothing in princple.  In practice it's triggering an amazing variety of 
toolchain bugs.

> do they stop us from using gcc's __thread keyword for per cpu variables
> or something? (*that* would be a nice feature)
>   

The powerpc guys tried it, and it doesn't work.  per-cpu is not 
semantically equivalent to per-thread.  If you have a function in which 
you refer to a percpu variable and then have a preemptable section in 
the middle followed by another reference to the same percpu variable, 
it's hard to stop gcc from caching a reference to the old tls variable, 
even though we may have switched cpus in the meantime.

Also, we explicitly use the other segment register in kernel mode, to 
avoid segment register switches where possible.  Even with 
-mcmodel=kernel, gcc generates %fs references to tls variables.

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