diff options
author | 2002-07-01 23:04:09 +0000 | |
---|---|---|
committer | 2002-07-01 23:04:09 +0000 | |
commit | b88f2991385a6ae8c31b591f2c56440eb0b938b9 (patch) | |
tree | 381d57ffc5e80d28d789c9b46f331574bc3a6888 /sys/kern/kern_malloc_debug.c | |
parent | Fix really long standing bug with fetching address cache entries: (diff) | |
download | wireguard-openbsd-b88f2991385a6ae8c31b591f2c56440eb0b938b9.tar.xz wireguard-openbsd-b88f2991385a6ae8c31b591f2c56440eb0b938b9.zip |
Don't abuse VM_PROT_ALL. Use VM_PROT_READ|VM_PROT_WRITE here.
We'll never want to exec code in malloc mappings.
Diffstat (limited to 'sys/kern/kern_malloc_debug.c')
-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; |