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.6 (requested by s...



details:   https://anonhg.NetBSD.org/src/rev/e05d4914d66a
branches:  netbsd-1-5
changeset: 491916:e05d4914d66a
user:      he <he%NetBSD.org@localhost>
date:      Sun Jun 17 22:26:47 2001 +0000

description:
Pull up revision 1.6 (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/compat_13_machdep.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r c9cf0340bfb2 -r e05d4914d66a sys/arch/i386/i386/compat_13_machdep.c
--- a/sys/arch/i386/i386/compat_13_machdep.c    Sun Jun 17 21:23:56 2001 +0000
+++ b/sys/arch/i386/i386/compat_13_machdep.c    Sun Jun 17 22:26:47 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_13_machdep.c,v 1.3 1998/09/13 01:42:45 thorpej Exp $    */
+/*     $NetBSD: compat_13_machdep.c,v 1.3.24.1 2001/06/17 22:26:47 he Exp $    */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -94,7 +94,8 @@
                    !USERMODE(context.sc_cs, context.sc_eflags))
                        return (EINVAL);
 
-               /* %fs and %gs were restored by the trampoline. */
+               tf->tf_gs = context.sc_gs;
+               tf->tf_fs = context.sc_fs;              
                tf->tf_es = context.sc_es;
                tf->tf_ds = context.sc_ds;
                tf->tf_eflags = context.sc_eflags;



Home | Main Index | Thread Index | Old Index