提交 72e12b76 编写于 作者: Z Zachary Amsden 提交者: Linus Torvalds

[PATCH] x86: bogus tls from gdt

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: NZachary Amsden <zach@vmware.com>
Acked-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 9f40a72a
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册