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.59 (requested by ...
details: https://anonhg.NetBSD.org/src/rev/93723b6a77a8
branches: netbsd-1-5
changeset: 491924:93723b6a77a8
user: he <he%NetBSD.org@localhost>
date: Sun Jun 17 22:27:10 2001 +0000
description:
Pull up revision 1.59 (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/sys_machdep.c | 18 +-----------------
1 files changed, 1 insertions(+), 17 deletions(-)
diffs (53 lines):
diff -r 406b139d7475 -r 93723b6a77a8 sys/arch/i386/i386/sys_machdep.c
--- a/sys/arch/i386/i386/sys_machdep.c Sun Jun 17 22:27:07 2001 +0000
+++ b/sys/arch/i386/i386/sys_machdep.c Sun Jun 17 22:27:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_machdep.c,v 1.48.14.2 2001/06/10 19:37:12 he Exp $ */
+/* $NetBSD: sys_machdep.c,v 1.48.14.3 2001/06/17 22:27:10 he Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -237,7 +237,6 @@
int error, i, n;
struct pcb *pcb = &p->p_addr->u_pcb;
pmap_t pmap = p->p_vmspace->vm_map.pmap;
- int fsslot, gsslot;
struct i386_set_ldt_args ua;
union descriptor *descv;
@@ -308,10 +307,6 @@
#endif
}
- if (pcb == curpcb)
- savectx(curpcb);
- fsslot = IDXSEL(pcb->pcb_fs);
- gsslot = IDXSEL(pcb->pcb_gs);
error = 0;
/* Check descriptors for access violations. */
@@ -338,11 +333,6 @@
error = EACCES;
goto out;
}
- /* Can't replace in use descriptor with gate. */
- if (n == fsslot || n == gsslot) {
- error = EBUSY;
- goto out;
- }
break;
case SDT_MEMEC:
case SDT_MEMEAC:
@@ -383,12 +373,6 @@
error = EACCES;
goto out;
}
- } else {
- /* Must be "present" if in use. */
- if (n == fsslot || n == gsslot) {
- error = EACCES;
- goto out;
- }
}
}
Home |
Main Index |
Thread Index |
Old Index