Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jul 2008 23:41:45 GMT
From:      Vincenzo Iozzo <snagg@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 145182 for review
Message-ID:  <200807132341.m6DNfjva079591@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=145182

Change 145182 by snagg@snagg_macosx on 2008/07/13 23:41:11

	IFC

Affected files ...

.. //depot/projects/soc2008/snagg-audit/sys/amd64/amd64/pmap.c#7 integrate
.. //depot/projects/soc2008/snagg-audit/sys/conf/newvers.sh#4 integrate
.. //depot/projects/soc2008/snagg-audit/sys/kern/subr_stack.c#2 integrate

Differences ...

==== //depot/projects/soc2008/snagg-audit/sys/amd64/amd64/pmap.c#7 (text+ko) ====

@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.631 2008/07/12 21:24:42 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.632 2008/07/13 18:19:53 alc Exp $");
 
 /*
  *	Manages physical address maps.
@@ -1041,17 +1041,25 @@
 vm_paddr_t
 pmap_kextract(vm_offset_t va)
 {
-	pd_entry_t *pde;
+	pd_entry_t pde;
 	vm_paddr_t pa;
 
 	if (va >= DMAP_MIN_ADDRESS && va < DMAP_MAX_ADDRESS) {
 		pa = DMAP_TO_PHYS(va);
 	} else {
-		pde = vtopde(va);
-		if (*pde & PG_PS) {
-			pa = (*pde & PG_PS_FRAME) | (va & PDRMASK);
+		pde = *vtopde(va);
+		if (pde & PG_PS) {
+			pa = (pde & PG_PS_FRAME) | (va & PDRMASK);
 		} else {
-			pa = *vtopte(va);
+			/*
+			 * Beware of a concurrent promotion that changes the
+			 * PDE at this point!  For example, vtopte() must not
+			 * be used to access the PTE because it would use the
+			 * new PDE.  It is, however, safe to use the old PDE
+			 * because the page table page is preserved by the
+			 * promotion.
+			 */
+			pa = *pmap_pde_to_pte(&pde, va);
 			pa = (pa & PG_FRAME) | (va & PAGE_MASK);
 		}
 	}

==== //depot/projects/soc2008/snagg-audit/sys/conf/newvers.sh#4 (text+ko) ====

@@ -28,7 +28,7 @@
 # SUCH DAMAGE.
 #
 #	@(#)newvers.sh	8.1 (Berkeley) 4/20/94
-# $FreeBSD: src/sys/conf/newvers.sh,v 1.75 2008/06/08 19:46:23 dougb Exp $
+# $FreeBSD: src/sys/conf/newvers.sh,v 1.76 2008/07/13 20:08:38 dougb Exp $
 
 TYPE="FreeBSD"
 REVISION="8.0"
@@ -97,7 +97,7 @@
 done
 
 if [ -n "$svnversion" -a -d "${SRCDIR}/.svn" ] ; then
-	svn=" @`cd $SRCDIR && $svnversion`"
+	svn=" r`cd $SRCDIR && $svnversion`"
 else
 	svn=""
 fi

==== //depot/projects/soc2008/snagg-audit/sys/kern/subr_stack.c#2 (text+ko) ====

@@ -27,7 +27,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/subr_stack.c,v 1.6 2007/12/03 14:44:35 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/subr_stack.c,v 1.7 2008/07/13 17:15:19 svn Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -40,7 +40,7 @@
 #include <sys/stack.h>
 #include <sys/systm.h>
 
-MALLOC_DEFINE(M_STACK, "stack", "Stack Traces");
+static MALLOC_DEFINE(M_STACK, "stack", "Stack Traces");
 
 static void stack_symbol(vm_offset_t pc, char *namebuf, u_int buflen,
 	    long *offset);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807132341.m6DNfjva079591>