diff options
author | Ariane van der Steldt <ariane@cvs.openbsd.org> | 2011-04-26 23:50:22 +0000 |
---|---|---|
committer | Ariane van der Steldt <ariane@cvs.openbsd.org> | 2011-04-26 23:50:22 +0000 |
commit | 970628326e5e2d15cc1bc9d97f07278a63489e38 (patch) | |
tree | 7e66b564303b97642735602db28c07dad4b9b0a2 /sys/uvm | |
parent | 723f37c08b6a672ccf72cfe6de243be2e6cba620 (diff) |
MMU address space holes are at a fixed position (ofcourse).
Therefore set UVM_FLAG_FIXED and enforce this.
ok oga@
Diffstat (limited to 'sys/uvm')
-rw-r--r-- | sys/uvm/uvm_map.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 9440e1563ed..07bc61fb37e 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.134 2011/04/18 19:23:46 art Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.135 2011/04/26 23:50:21 ariane Exp $ */ /* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */ /* @@ -744,6 +744,14 @@ uvm_map_p(struct vm_map *map, vaddr_t *startp, vsize_t size, map, *startp, size, flags); UVMHIST_LOG(maphist, " uobj/offset %p/%ld", uobj, (u_long)uoffset,0,0); + /* + * Holes are incompatible with other types of mappings. + */ + if (flags & UVM_FLAG_HOLE) { + KASSERT(uobj == NULL && (flags & UVM_FLAG_FIXED) != 0 && + (flags & (UVM_FLAG_OVERLAY | UVM_FLAG_COPYONW)) == 0); + } + #ifdef KVA_GUARDPAGES if (map == kernel_map && !(flags & UVM_FLAG_FIXED)) { /* |