diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-09-21 10:04:43 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-09-21 10:04:43 +0000 |
commit | a11347447703614180512ff037c5940fa3900f0d (patch) | |
tree | 6074f97409f10b3ef0bf4c19779a187e6c2e2373 /sys/arch | |
parent | c980a7fdce027a2aa8c25e7eb949e3ce2eaabffe (diff) |
Create process map holes with UVM_INH_SHARE so that they don't get lost in
fork-without-exec situation (such as privsep'd binaries).
Fixes occasional SIGSEGV in syslogd and pflogd on sun4/4c/4e.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc/sparc/pmap.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/pmap.c | 4 | ||||
-rw-r--r-- | sys/arch/vax/vax/pmap.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c index c83d2791906..1b1507a40a0 100644 --- a/sys/arch/sparc/sparc/pmap.c +++ b/sys/arch/sparc/sparc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.162 2013/06/11 16:42:11 deraadt Exp $ */ +/* $OpenBSD: pmap.c,v 1.163 2013/09/21 10:04:42 miod Exp $ */ /* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */ /* @@ -6274,7 +6274,7 @@ pmap_remove_holes(struct vm_map *map) (void)uvm_map(map, &shole, ehole - shole, NULL, UVM_UNKNOWN_OFFSET, 0, - UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE, + UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_SHARE, UVM_ADV_RANDOM, UVM_FLAG_NOMERGE | UVM_FLAG_HOLE | UVM_FLAG_FIXED)); } diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c index cf3a011b225..38dd2e597fa 100644 --- a/sys/arch/sparc64/sparc64/pmap.c +++ b/sys/arch/sparc64/sparc64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.79 2013/06/11 16:42:12 deraadt Exp $ */ +/* $OpenBSD: pmap.c,v 1.80 2013/09/21 10:04:42 miod Exp $ */ /* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */ #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ /* @@ -3638,7 +3638,7 @@ pmap_remove_holes(struct vm_map *map) return; (void)uvm_map(map, &shole, ehole - shole, NULL, UVM_UNKNOWN_OFFSET, 0, - UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE, + UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_SHARE, UVM_ADV_RANDOM, UVM_FLAG_NOMERGE | UVM_FLAG_HOLE | UVM_FLAG_FIXED)); } diff --git a/sys/arch/vax/vax/pmap.c b/sys/arch/vax/vax/pmap.c index e1e6464a519..ebf1d81aac3 100644 --- a/sys/arch/vax/vax/pmap.c +++ b/sys/arch/vax/vax/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.59 2013/07/07 18:59:36 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.60 2013/09/21 10:04:42 miod Exp $ */ /* $NetBSD: pmap.c,v 1.74 1999/11/13 21:32:25 matt Exp $ */ /* * Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden. @@ -414,7 +414,7 @@ pmap_remove_holes(struct vm_map *map) return; (void)uvm_map(map, &shole, ehole - shole, NULL, UVM_UNKNOWN_OFFSET, 0, - UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE, + UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_SHARE, UVM_ADV_RANDOM, UVM_FLAG_NOMERGE | UVM_FLAG_HOLE | UVM_FLAG_FIXED)); } |