diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-06-03 13:30:05 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-06-03 13:30:05 +0000 |
commit | 9348823983c1093c5fae4fe0a8d18ecf1754d41d (patch) | |
tree | d75bc6f1a9c57be17e42aba6f8f0ea42940ed807 | |
parent | ac9f553aab41541c459ec2b8ce9e508714355536 (diff) |
Make sure uvm_map_extract() entesr mappings at an address that doesn't
introduce any virtual cache aliasing problems. Fixes a regression introduced
by vmmap.
ok ariane@, jsing@
-rw-r--r-- | sys/uvm/uvm_map.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 80b99da28a6..5ac0e9fcbed 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.154 2012/06/01 05:47:10 guenther Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.155 2012/06/03 13:30:04 kettenis Exp $ */ /* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */ /* @@ -3972,7 +3972,8 @@ uvm_map_extract(struct vm_map *srcmap, vaddr_t start, vsize_t len, vm_map_lock(kernel_map); if (uvm_map_findspace(kernel_map, &tmp1, &tmp2, &dstaddr, len, - PAGE_SIZE, 0, VM_PROT_NONE, 0) != 0) { + MAX(PAGE_SIZE, PMAP_PREFER_ALIGN()), PMAP_PREFER_OFFSET(start), + VM_PROT_NONE, 0) != 0) { error = ENOMEM; goto fail2; } |