diff options
| author | Guillem Jover <guillem@debian.org> | 2005-11-10 02:42:24 +0000 |
|---|---|---|
| committer | Guillem Jover <guillem@debian.org> | 2005-11-10 02:42:24 +0000 |
| commit | 7d51a0898858dff95ca987081d1feae206240f86 (patch) | |
| tree | 3f7608f45d7bb711f47af4d8b0938597e049ee3a | |
| parent | e7d14949dd8125c534a8abed8a61a2627d9c0d55 (diff) | |
Set correct values for %gs and %fs when entering kernel mode. Make sure
to always copy the master LDT when the user does not have a modified one.
- debian/patches/31_tls_ldt.patch: New file.
Thanks to Jeroen Dekkers <jeroen@dekkers.cx>.
| -rw-r--r-- | debian/changelog | 4 | ||||
| -rw-r--r-- | debian/patches/31_tls_ldt.patch | 53 |
2 files changed, 57 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 5abb3b3..46e3ca0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,10 @@ gnumach (1:20050801-5) unstable; urgency=low * Fix an off-by-one bug in the PATA probe function. - debian/patches/21_pata_off_by_one_irq.patch: New file. Thanks to Patch by Sergio Lopez <koro@sinrega.org>. + * Set correct values for %gs and %fs when entering kernel mode. Make sure + to always copy the master LDT when the user does not have a modified one. + - debian/patches/31_tls_ldt.patch: New file. + Thanks to Jeroen Dekkers <jeroen@dekkers.cx>. * Now using Standards-Version 3.6.2 (no changes needed). -- Guillem Jover <guillem@debian.org> Mon, 1 Aug 2005 04:43:41 +0300 diff --git a/debian/patches/31_tls_ldt.patch b/debian/patches/31_tls_ldt.patch new file mode 100644 index 0000000..5cbc6d2 --- /dev/null +++ b/debian/patches/31_tls_ldt.patch @@ -0,0 +1,53 @@ +#DPATCHLEVEL=0 + +2005-09-18 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. + + +Index: i386/i386/locore.S +=================================================================== +RCS file: /cvsroot/hurd/gnumach/i386/i386/locore.S,v +retrieving revision 1.6.2.1 +diff -u -p -r1.6.2.1 locore.S +--- i386/i386/locore.S 28 Nov 2004 17:29:35 -0000 1.6.2.1 ++++ i386/i386/locore.S 30 Aug 2005 10:34:02 -0000 +@@ -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 +Index: i386/i386/user_ldt.c +=================================================================== +RCS file: /cvsroot/hurd/gnumach/i386/i386/user_ldt.c,v +retrieving revision 1.2 +diff -u -p -r1.2 user_ldt.c +--- i386/i386/user_ldt.c 16 Sep 1999 02:17:48 -0000 1.2 ++++ i386/i386/user_ldt.c 30 Aug 2005 10:34:02 -0000 +@@ -225,7 +225,7 @@ i386_set_ldt(thread, first_selector, des + (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++) { + |
