Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/arch/i386/i386 Pull up revision 1.53 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/406b139d7475
branches:  netbsd-1-5
changeset: 491923:406b139d7475
user:      he <he%NetBSD.org@localhost>
date:      Sun Jun 17 22:27:07 2001 +0000

description:
Pull up revision 1.53 (requested by sommerfeld):
  Add %fs/%gs to trap frame and save/restore them on trap/interupt/
  syscall entry from userspace.

  Remove special-case ``by hand'' validation of %fs/%gs register
  values s well as special handling of them in various signal
  handling paths.  Now, like %ds and %es, they are validated by
  the hardware on return to userland.

  This paves the way for the use of %fs for per-cpu data on multi-
  processor systems, and fixes an otherwise difficult-to-fix
  interaction between threads/clone(2) and USER_LDT.

diffstat:

 sys/arch/i386/i386/svr4_machdep.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r e1818ba96e31 -r 406b139d7475 sys/arch/i386/i386/svr4_machdep.c
--- a/sys/arch/i386/i386/svr4_machdep.c Sun Jun 17 22:27:03 2001 +0000
+++ b/sys/arch/i386/i386/svr4_machdep.c Sun Jun 17 22:27:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svr4_machdep.c,v 1.47.4.1 2001/05/09 20:43:18 he Exp $  */
+/*     $NetBSD: svr4_machdep.c,v 1.47.4.2 2001/06/17 22:27:07 he Exp $  */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -145,8 +145,8 @@
        } else
 #endif
        {
-               __asm("movl %%gs,%w0" : "=r" (r[SVR4_X86_GS]));
-               __asm("movl %%fs,%w0" : "=r" (r[SVR4_X86_FS]));
+               r[SVR4_X86_GS] = tf->tf_gs;
+               r[SVR4_X86_FS] = tf->tf_fs;
                r[SVR4_X86_ES] = tf->tf_es;
                r[SVR4_X86_DS] = tf->tf_ds;
                r[SVR4_X86_EFL] = tf->tf_eflags;



Home | Main Index | Thread Index | Old Index