Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/compat/linux/arch/i386 Pull up revision 1.65 (reque...



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

description:
Pull up revision 1.65 (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/compat/linux/arch/i386/linux_machdep.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 72b475f9709c -r 365b7ad24c6b sys/compat/linux/arch/i386/linux_machdep.c
--- a/sys/compat/linux/arch/i386/linux_machdep.c        Sun Jun 17 22:27:17 2001 +0000
+++ b/sys/compat/linux/arch/i386/linux_machdep.c        Sun Jun 17 22:27:20 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_machdep.c,v 1.50.2.2 2001/05/15 19:59:32 he Exp $        */
+/*     $NetBSD: linux_machdep.c,v 1.50.2.3 2001/06/17 22:27:20 he Exp $        */
 
 /*-
  * Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
@@ -168,8 +168,8 @@
        } else
 #endif
        {
-               __asm("movl %%gs,%w0" : "=r" (frame.sf_sc.sc_gs));
-               __asm("movl %%fs,%w0" : "=r" (frame.sf_sc.sc_fs));
+               frame.sf_sc.sc_gs = tf->tf_gs;
+               frame.sf_sc.sc_fs = tf->tf_fs;          
                frame.sf_sc.sc_es = tf->tf_es;
                frame.sf_sc.sc_ds = tf->tf_ds;
                frame.sf_sc.sc_eflags = tf->tf_eflags;



Home | Main Index | Thread Index | Old Index