diff options
author | Thomas Schwinge <tschwinge@gnu.org> | 2006-01-26 14:53:56 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-06-18 00:26:30 +0200 |
commit | a52299fcf0d391e1286db40db66912e31ecf3fbc (patch) | |
tree | bfa0d15ae4f85e151d73b8737bd28762942769b6 /i386 | |
parent | acb792b101fd685262c93b75ebe4c033f2d2c079 (diff) |
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.
Diffstat (limited to 'i386')
-rw-r--r-- | i386/i386/locore.S | 4 | ||||
-rw-r--r-- | i386/i386/user_ldt.c | 2 |
2 files changed, 5 insertions, 1 deletions
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++) { |