From 58c32fe1ad0fb0c7bab8882ddec218b9eda9f1a5 Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 25 Aug 2016 05:12:06 +0000 Subject: [PATCH] do not request RWX mappings, RW will do --- regress/sys/uvm/mmap_fixed/mmap_fixed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regress/sys/uvm/mmap_fixed/mmap_fixed.c b/regress/sys/uvm/mmap_fixed/mmap_fixed.c index 4b3669ba5da..c53acb3e2aa 100644 --- a/regress/sys/uvm/mmap_fixed/mmap_fixed.c +++ b/regress/sys/uvm/mmap_fixed/mmap_fixed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mmap_fixed.c,v 1.1.1.1 2006/04/06 20:39:03 kurt Exp $ */ +/* $OpenBSD: mmap_fixed.c,v 1.2 2016/08/25 05:12:06 deraadt Exp $ */ /* * Public domain. 2006, Kurt Miller @@ -24,7 +24,7 @@ main(void) mem_area = mmap(0, MEM_SIZE, PROT_NONE, MAP_ANON, -1, 0); for (i = 0; i < 20000; i++) { - if (mmap(mem_area, MEM_SIZE, PROT_READ|PROT_WRITE|PROT_EXEC, + if (mmap(mem_area, MEM_SIZE, PROT_READ|PROT_WRITE, MAP_ANON|MAP_FIXED, -1, 0) == MAP_FAILED) err(1, NULL); } -- 2.20.1