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:	Tue, 20 Nov 2007 13:45:44 +1100
From:	Paul Mackerras <paulus@...ba.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Christoph Lameter <clameter@....com>, ak@...e.de,
	akpm@...ux-foundation.org, travis@....com,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	linux-kernel@...r.kernel.org
Subject: Re: [rfc 37/45] x86_64: Support for fast per cpu operations

H. Peter Anvin writes:

> There was, at some point, discussion about using the gcc TLS mechanism, 
> which should permit even better code to be generated.  Unfortunately, it 
> would require gcc to be able to reference %gs instead of %fs (and vice 
> versa for i386), which I don't think is available in anything except 
> maybe the most cutting-edge version of gcc.
> 
> However, if we're doing a masssive revampt it would be good to get an 
> idea of how to migrate to that model eventually, or why it doesn't make 
> sense at all.

The problem I found when I tried to do that on powerpc is that gcc
believes it can cache addresses of TLS variables.  If you try and use
TLS accesses for per-cpu variables then you end up accessing the wrong
cpu's variables due to that, since our "TLS" pointer can change at any
point where preemption is enabled.

If we wanted to do per-task variables then TLS would be perfect for
that.

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