Module Name:    src
Committed By:   matt
Date:           Thu Sep  1 18:33:11 UTC 2011

Modified Files:
        src/sys/kern: kern_verifiedexec.c

Log Message:
Allocate a color compatible VA for the page we are entering.


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/sys/kern/kern_verifiedexec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/kern_verifiedexec.c
diff -u src/sys/kern/kern_verifiedexec.c:1.125 src/sys/kern/kern_verifiedexec.c:1.126
--- src/sys/kern/kern_verifiedexec.c:1.125	Sat Jan 29 00:38:25 2011
+++ src/sys/kern/kern_verifiedexec.c	Thu Sep  1 18:33:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_verifiedexec.c,v 1.125 2011/01/29 00:38:25 christos Exp $	*/
+/*	$NetBSD: kern_verifiedexec.c,v 1.126 2011/09/01 18:33:11 matt Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2006 Elad Efrat <[email protected]>
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.125 2011/01/29 00:38:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.126 2011/09/01 18:33:11 matt Exp $");
 
 #include "opt_veriexec.h"
 
@@ -782,7 +782,8 @@
 
 	ctx = kmem_alloc(vfe->ops->context_size, KM_SLEEP);
 	fp = kmem_alloc(vfe->ops->hash_len, KM_SLEEP);
-	kva = uvm_km_alloc(kernel_map, PAGE_SIZE, 0, UVM_KMF_VAONLY | UVM_KMF_WAITVA);
+	kva = uvm_km_alloc(kernel_map, PAGE_SIZE, VM_PGCOLOR_BUCKET(pg),
+	    UVM_KMF_COLORMATCH | UVM_KMF_VAONLY | UVM_KMF_WAITVA);
 	pmap_kenter_pa(kva, VM_PAGE_TO_PHYS(pg), VM_PROT_READ, 0);
 	pmap_update(pmap_kernel());
 

Reply via email to