Module Name:    src
Committed By:   reinoud
Date:           Tue Jan 10 10:09:49 UTC 2012

Modified Files:
        src/sys/arch/usermode/usermode: pmap.c

Log Message:
Explicitly protect the kernel image against tampering by marking it R-X


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/usermode/usermode/pmap.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/arch/usermode/usermode/pmap.c
diff -u src/sys/arch/usermode/usermode/pmap.c:1.99 src/sys/arch/usermode/usermode/pmap.c:1.100
--- src/sys/arch/usermode/usermode/pmap.c:1.99	Mon Jan  9 14:58:15 2012
+++ src/sys/arch/usermode/usermode/pmap.c	Tue Jan 10 10:09:49 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.99 2012/01/09 14:58:15 reinoud Exp $ */
+/* $NetBSD: pmap.c,v 1.100 2012/01/10 10:09:49 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk <[email protected]>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.99 2012/01/09 14:58:15 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.100 2012/01/10 10:09:49 reinoud Exp $");
 
 #include "opt_memsize.h"
 #include "opt_kmempages.h"
@@ -251,12 +251,9 @@ pmap_bootstrap(void)
 #endif
 
 	/* protect the current kernel section */
-#if 0
-	int err;
 	err = thunk_mprotect((void *) kmem_k_start, kmem_k_end - kmem_k_start,
 		THUNK_PROT_READ | THUNK_PROT_EXEC);
 	assert(err == 0);
-#endif
 
 	/* initialize counters */
 	fpos = 0;

Reply via email to