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, 29 Nov 2007 21:11:26 +0100
From:	Andi Kleen <ak@...e.de>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Chuck Ebbert <cebbert@...hat.com>,
	Roland McGrath <roland@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>,
	Jeremy Fitzhardinge <jeremy@...p.org>, zach@...are.com
Subject: Re: [PATCH x86/mm 6/6] x86-64 ia32 ptrace get/putreg32 current task


> HOWEVER. That is actually not the right (well, "complete") conditional, 
> since it's only one sub-case of the thing that matters. The right 
> conditional is probably
> 
> 	/*
> 	 * Restore %gs if needed (which is common).
> 	 * We can avoid it if they are identical, and
> 	 * point to the GDT.

How would you catch (common) the case of them having different bases in the 
GDT TLS entries? At some point the selector has to be reloaded, otherwise 
it won't be picked up by the CPU.

I think the original condition is correct. You could maybe merge it with the 
TLS entry rewrite and only do it if something changes there. Not
sure it is worth it though.

-Andi
> 	 */
> 	if ((prev->gs ^ next->gs) | (next->gs & 4))
> 		loadsegment(gs, next->gs);
> 
> At that point, we would only have to reload stuff if the user actually 
> uses a local descriptor table entry (which does happen for threaded apps, 
> I guess, but at least we avoid it for all the common traditional UNIX 
> processes).
> 
> 			Linus
> 


-
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