summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2017-07-12 22:56:22 +0000
committerbluhm <bluhm@openbsd.org>2017-07-12 22:56:22 +0000
commit9b01b07940d66da05844b8f441ee8a525da7f320 (patch)
tree76fbea3c530727fa0d50a907f22b3db087305abe
parentconsistently use "User settings" instead of a mixture of this and a (diff)
downloadwireguard-openbsd-9b01b07940d66da05844b8f441ee8a525da7f320.tar.xz
wireguard-openbsd-9b01b07940d66da05844b8f441ee8a525da7f320.zip
We cannot mmap(2) memory at VM_MAXUSER_ADDRESS as the full allocated
page must be below that address. Subtract PAGE_SIZE from the hint address, then regress passes.
-rw-r--r--regress/sys/uvm/mmap_hint/mmap_hint.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/regress/sys/uvm/mmap_hint/mmap_hint.c b/regress/sys/uvm/mmap_hint/mmap_hint.c
index 10bf1082a78..e6d23d69634 100644
--- a/regress/sys/uvm/mmap_hint/mmap_hint.c
+++ b/regress/sys/uvm/mmap_hint/mmap_hint.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mmap_hint.c,v 1.3 2017/07/07 10:49:12 bluhm Exp $ */
+/* $OpenBSD: mmap_hint.c,v 1.4 2017/07/12 22:56:22 bluhm Exp $ */
/*
* Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl>
*
@@ -72,9 +72,9 @@ main()
p = mmap_hint(NULL);
/* Check hinted allocation at top of map. */
- fprintf(stderr, "2: Checking hint VM_MAXUSER_ADDRESS 0x%lx mmap\n",
- (unsigned long)VM_MAXUSER_ADDRESS);
- p = mmap_hint((void*)VM_MAXUSER_ADDRESS);
+ fprintf(stderr, "2: Checking hint VM_MAXUSER_ADDRESS-page 0x%lx mmap\n",
+ (unsigned long)VM_MAXUSER_ADDRESS - PAGE_SIZE);
+ p = mmap_hint((void*)VM_MAXUSER_ADDRESS - PAGE_SIZE);
/* Check hinted allocation at bottom of map. */
fprintf(stderr, "3: Checking hint VM_MIN_ADDRESS 0x%lx mmap\n",