diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-07-01 23:04:10 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-07-01 23:04:10 +0000 |
commit | bbbf8b82efecc39cbffaaf35ec04d73ae0d35f12 (patch) | |
tree | e548d8d07ccca9415cdebfb8a457e581086615be | |
parent | ecddbed7b7e2f74b49a243a92cbd4ccea93d8aa9 (diff) |
Don't abuse VM_PROT_ALL. Use VM_PROT_READ|VM_PROT_WRITE here.
We'll never want to exec code in malloc mappings.
-rw-r--r-- | sys/kern/kern_malloc_debug.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_malloc_debug.c b/sys/kern/kern_malloc_debug.c index b29aaf74daf..1e67b0d3a36 100644 --- a/sys/kern/kern_malloc_debug.c +++ b/sys/kern/kern_malloc_debug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_malloc_debug.c,v 1.17 2002/06/11 04:34:30 art Exp $ */ +/* $OpenBSD: kern_malloc_debug.c,v 1.18 2002/07/01 23:04:09 art Exp $ */ /* * Copyright (c) 1999, 2000 Artur Grabowski <art@openbsd.org> @@ -139,7 +139,7 @@ debug_malloc(unsigned long size, int type, int flags, void **addr) debug_malloc_allocs++; splx(s); - pmap_kenter_pa(md->md_va, md->md_pa, VM_PROT_ALL); + pmap_kenter_pa(md->md_va, md->md_pa, VM_PROT_READ|VM_PROT_WRITE); pmap_update(pmap_kernel()); md->md_size = size; |