lkml.org 
[lkml]   [2005]   [Jul]   [1]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateFri, 1 Jul 2005 09:14:36 +0200
FromIngo Molnar <>
SubjectRe: [patch 2.6.13-rc1] i386: fix incorrect TSS entry for LDT
* Chuck Ebbert <76306.1226@compuserve.com> wrote:

> The LDT entry in the i386 TSS needs to be a selector, not an entry 
> number.

you are right - but this shouldnt really matter, because this TSS field 
is only loaded by a CPU upon a real TSS switch, which we never do. We 
load the LDT selector manually, via the lldt instruction (load_LDT*()).  
(It could at most matter when we do a double-fault, but the TSS of the 
doublefault handler is set up separately, which has the .ldt field 
cleared.)

so i'd rather suggest to remove the initialization altogether, as per 
the (tested) patch below.

	Ingo

---
noticed by Chuck Ebbert: the .ldt entry of the TSS was set up
incorrectly. It never mattered since this was a leftover from
old times, so remove it.

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

 include/asm-i386/processor.h |    1 -
 1 files changed, 1 deletion(-)
Index: linux/include/asm-i386/processor.h
===================================================================
--- linux.orig/include/asm-i386/processor.h
+++ linux/include/asm-i386/processor.h
@@ -474,7 +474,6 @@ struct thread_struct {
 	.esp0		= sizeof(init_stack) + (long)&init_stack,	\
 	.ss0		= __KERNEL_DS,					\
 	.ss1		= __KERNEL_CS,					\
-	.ldt		= GDT_ENTRY_LDT,				\
 	.io_bitmap_base	= INVALID_IO_BITMAP_OFFSET,			\
 	.io_bitmap	= { [ 0 ... IO_BITMAP_LONGS] = ~0 },		\
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-07-01 07:20    [W:0.497 / U:0.100 seconds]
©2003-2008 Jasper Spaans