summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--i386/i386/locore.S4
-rw-r--r--i386/i386/user_ldt.c2
3 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 77cf59a..6d68a36 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-01-26 Jeroen Dekkers <jeroen@dekkers.cx>
+
+ * i386/i386/locore.S (trap_push_segs): Switch fs and gs to kernel
+ data segment too.
+ (syscall_entry_2): Likewise.
+ * i386/i386/user_ldt.c (i386_set_ldt): Always copy the master LDT
+ when there is no old user LDT.
+
2006-01-26 Samuel Thibault <samuel.thibault@ens-lyon.org>
* linux/dev/arch/i386/kernel/irq.c (linux_intr): Disable interrupts
diff --git a/i386/i386/locore.S b/i386/i386/locore.S
index 3a6d350..7d320d7 100644
--- a/i386/i386/locore.S
+++ b/i386/i386/locore.S
@@ -464,6 +464,8 @@ trap_push_segs:
mov %ss,%ax /* switch to kernel data segment */
mov %ax,%ds /* (same as kernel stack segment) */
mov %ax,%es
+ mov %ax,%fs
+ mov %ax,%gs
trap_set_segs:
cld /* clear direction flag */
@@ -982,6 +984,8 @@ syscall_entry_2:
mov %ss,%dx /* switch to kernel data segment */
mov %dx,%ds
mov %dx,%es
+ mov %dx,%fs
+ mov %dx,%gs
/*
* Shuffle eflags,eip,cs into proper places
diff --git a/i386/i386/user_ldt.c b/i386/i386/user_ldt.c
index 5c5df64..d259ea3 100644
--- a/i386/i386/user_ldt.c
+++ b/i386/i386/user_ldt.c
@@ -225,7 +225,7 @@ i386_set_ldt(thread, first_selector, desc_list, count, desc_list_inline)
(char *)&new_ldt->ldt[0],
old_ldt->desc.limit_low + 1);
}
- else if (thread == current_thread()) {
+ else {
struct real_descriptor template = {0, 0, 0, ACC_P, 0, 0 ,0};
for (dp = &new_ldt->ldt[0], i = 0; i < first_desc; i++, dp++) {