linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] Bogus tls from gdt
@ 2005-09-22  7:37 Zachary Amsden, Zachary Amsden
  2005-09-22  8:57 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Zachary Amsden, Zachary Amsden @ 2005-09-22  7:37 UTC (permalink / raw)
  To: Linus Torvalds, Jeffrey Sheldon, Ole Agesen, Shai Fultheim,
	Andrew Morton, Jack Lo, Ingo Molnar, Linux Kernel Mailing List,
	Virtualization Mailing List, Chris Wright, Martin Bligh,
	Pratap Subrahmanyam, Christopher Li, H. Peter Anvin,
	Zwane Mwaikambo, Andi Kleen, Zachary Amsden

The per-CPU initialization code is copying in bogus data into
thread->tls_array.  Note that it copies &per_cpu(cpu_gdt_table, cpu),
not &per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN).  That is totally
broken and unnecessary.  Make the initialization explicitly NULL.

Signed-off-by: Zachary Amsden <zach@vmware.com>

Index: linux-2.6.14-rc1/arch/i386/kernel/cpu/common.c
===================================================================
--- linux-2.6.14-rc1.orig/arch/i386/kernel/cpu/common.c	2005-09-20 14:49:10.000000000 -0700
+++ linux-2.6.14-rc1/arch/i386/kernel/cpu/common.c	2005-09-20 14:49:41.000000000 -0700
@@ -607,12 +607,6 @@ void __devinit cpu_init(void)
 	cpu_gdt_descr[cpu].address =
 	    (unsigned long)&per_cpu(cpu_gdt_table, cpu);
 
-	/*
-	 * Set up the per-thread TLS descriptor cache:
-	 */
-	memcpy(thread->tls_array, &per_cpu(cpu_gdt_table, cpu),
-		GDT_ENTRY_TLS_ENTRIES * 8);
-
 	load_gdt(&cpu_gdt_descr[cpu]);
 	load_idt(&idt_descr);
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/3] Bogus tls from gdt
  2005-09-22  7:37 [PATCH 1/3] Bogus tls from gdt Zachary Amsden, Zachary Amsden
@ 2005-09-22  8:57 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2005-09-22  8:57 UTC (permalink / raw)
  To: Zachary Amsden
  Cc: Linus Torvalds, Jeffrey Sheldon, Ole Agesen, Shai Fultheim,
	Andrew Morton, Jack Lo, Linux Kernel Mailing List,
	Virtualization Mailing List, Chris Wright, Martin Bligh,
	Pratap Subrahmanyam, Christopher Li, H. Peter Anvin,
	Zwane Mwaikambo, Andi Kleen


* Zachary Amsden <zach@vmware.com> wrote:

> The per-CPU initialization code is copying in bogus data into 
> thread->tls_array.  Note that it copies &per_cpu(cpu_gdt_table, cpu), 
> not &per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN).  That is totally 
> broken and unnecessary.  Make the initialization explicitly NULL.
> 
> Signed-off-by: Zachary Amsden <zach@vmware.com>

Acked-by: Ingo Molnar <mingo@elte.hu>

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-22  8:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-22  7:37 [PATCH 1/3] Bogus tls from gdt Zachary Amsden, Zachary Amsden
2005-09-22  8:57 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).