summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-07-24 01:15:40 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-07-24 01:15:40 +0000
commitbefce8bbc6a3f0881efe0d0290480512962bd8c5 (patch)
treef1715449337d34d08c587d41745daddd130eb855 /sys
parente104fdd5e62b5b3c72cc793a1518a90ea21b6dcf (diff)
limit user code up to below the user stack, making stack addresses, effectively, unexecutable. signal trampoline is mapped elesewhere now, 10x to art@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/machdep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 936990935f6..70d909efa81 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.212 2002/07/20 19:24:56 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.213 2002/07/24 01:15:39 mickey Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -2105,7 +2105,8 @@ init386(first_avail)
setsegment(&gdt[GDATA_SEL].sd, 0, 0xfffff, SDT_MEMRWA, SEL_KPL, 1, 1);
setsegment(&gdt[GLDT_SEL].sd, ldt, sizeof(ldt) - 1, SDT_SYSLDT, SEL_KPL,
0, 0);
- setsegment(&gdt[GUCODE_SEL].sd, 0, i386_btop(VM_MAXUSER_ADDRESS) - 1,
+ setsegment(&gdt[GUCODE_SEL].sd, 0,
+ i386_btop(VM_MAXUSER_ADDRESS - MAXSSIZ) - 1,
SDT_MEMERA, SEL_UPL, 1, 1);
setsegment(&gdt[GUDATA_SEL].sd, 0, i386_btop(VM_MAXUSER_ADDRESS) - 1,
SDT_MEMRWA, SEL_UPL, 1, 1);