* [patch 2.6.13-rc1] i386: fix incorrect TSS entry for LDT
@ 2005-07-01 4:40 Chuck Ebbert
2005-07-01 7:14 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Chuck Ebbert @ 2005-07-01 4:40 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, eliad lubovsky, Ingo Molnar, Linus Torvalds
The LDT entry in the i386 TSS needs to be a selector, not an entry number.
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Index: 2.6.13-rc1/include/asm-i386/processor.h
===================================================================
--- 2.6.13-rc1.orig/include/asm-i386/processor.h 2005-06-30 15:46:17.176906000 -0400
+++ 2.6.13-rc1/include/asm-i386/processor.h 2005-07-01 00:23:38.666906000 -0400
@@ -474,7 +474,7 @@
.esp0 = sizeof(init_stack) + (long)&init_stack, \
.ss0 = __KERNEL_DS, \
.ss1 = __KERNEL_CS, \
- .ldt = GDT_ENTRY_LDT, \
+ .ldt = GDT_ENTRY_LDT * 8, \
.io_bitmap_base = INVALID_IO_BITMAP_OFFSET, \
.io_bitmap = { [ 0 ... IO_BITMAP_LONGS] = ~0 }, \
}
--
Chuck
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 2.6.13-rc1] i386: fix incorrect TSS entry for LDT
2005-07-01 4:40 [patch 2.6.13-rc1] i386: fix incorrect TSS entry for LDT Chuck Ebbert
@ 2005-07-01 7:14 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2005-07-01 7:14 UTC (permalink / raw)
To: Chuck Ebbert; +Cc: linux-kernel, Andrew Morton, eliad lubovsky, Linus Torvalds
* 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 }, \
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-01 7:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-01 4:40 [patch 2.6.13-rc1] i386: fix incorrect TSS entry for LDT Chuck Ebbert
2005-07-01 7:14 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®