svn commit: r195605 - user/kmacy/releng_7_2_fcs_1/sys/vm

Kip Macy kmacy at FreeBSD.org
Sat Jul 11 03:00:37 UTC 2009


Author: kmacy
Date: Sat Jul 11 03:00:37 2009
New Revision: 195605
URL: http://svn.freebsd.org/changeset/base/195605

Log:
  - don't map kernel thread stacks executable
  - exclude vnode pager buffers from core dumps

Modified:
  user/kmacy/releng_7_2_fcs_1/sys/vm/vm_glue.c
  user/kmacy/releng_7_2_fcs_1/sys/vm/vnode_pager.c

Modified: user/kmacy/releng_7_2_fcs_1/sys/vm/vm_glue.c
==============================================================================
--- user/kmacy/releng_7_2_fcs_1/sys/vm/vm_glue.c	Sat Jul 11 02:58:36 2009	(r195604)
+++ user/kmacy/releng_7_2_fcs_1/sys/vm/vm_glue.c	Sat Jul 11 03:00:37 2009	(r195605)
@@ -372,7 +372,8 @@ vm_thread_new(struct thread *td, int pag
 		m->valid = VM_PAGE_BITS_ALL;
 	}
 	VM_OBJECT_UNLOCK(ksobj);
-	pmap_qenter(ks, ma, pages);
+	pmap_qenter_prot(ks, ma, pages,
+	    (VM_PROT_READ|VM_PROT_WRITE));
 	return (1);
 }
 
@@ -464,7 +465,8 @@ vm_thread_swapin(struct thread *td)
 		vm_page_wakeup(m);
 	}
 	VM_OBJECT_UNLOCK(ksobj);
-	pmap_qenter(td->td_kstack, ma, pages);
+	pmap_qenter_prot(td->td_kstack, ma, pages,
+	    (VM_PROT_READ|VM_PROT_WRITE));
 	cpu_thread_swapin(td);
 }
 

Modified: user/kmacy/releng_7_2_fcs_1/sys/vm/vnode_pager.c
==============================================================================
--- user/kmacy/releng_7_2_fcs_1/sys/vm/vnode_pager.c	Sat Jul 11 02:58:36 2009	(r195604)
+++ user/kmacy/releng_7_2_fcs_1/sys/vm/vnode_pager.c	Sat Jul 11 03:00:37 2009	(r195605)
@@ -900,7 +900,8 @@ vnode_pager_generic_getpages(vp, m, byte
 	/*
 	 * and map the pages to be read into the kva
 	 */
-	pmap_qenter(kva, m, count);
+	pmap_qenter_prot(kva, m, count,
+	    (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXCLUDE));
 
 	/* build a minimal buffer header */
 	bp->b_iocmd = BIO_READ;


More information about the svn-src-user mailing list