From b88f2991385a6ae8c31b591f2c56440eb0b938b9 Mon Sep 17 00:00:00 2001 From: art Date: Mon, 1 Jul 2002 23:04:09 +0000 Subject: Don't abuse VM_PROT_ALL. Use VM_PROT_READ|VM_PROT_WRITE here. We'll never want to exec code in malloc mappings. --- sys/kern/kern_malloc_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern/kern_malloc_debug.c') 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 @@ -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; -- cgit v1.2.3-59-g8ed1b