Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Dec 2017 03:49:53 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326675 - head/sys/powerpc/booke
Message-ID:  <201712080349.vB83nrdx089326@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Fri Dec  8 03:49:53 2017
New Revision: 326675
URL: https://svnweb.freebsd.org/changeset/base/326675

Log:
  Remove PTE VA mappings for tracked pages in 64-bit mode
  
  This was done in 32-bit mode, but not duplicated when 64-bit mode was
  brought in.  Without this, stale mappings can be left, leading to odd
  crashes when the wrong VA is checked in XX_PhysToVirt() (dpaa(4)).

Modified:
  head/sys/powerpc/booke/pmap.c

Modified: head/sys/powerpc/booke/pmap.c
==============================================================================
--- head/sys/powerpc/booke/pmap.c	Fri Dec  8 00:57:13 2017	(r326674)
+++ head/sys/powerpc/booke/pmap.c	Fri Dec  8 03:49:53 2017	(r326675)
@@ -1291,6 +1291,10 @@ pte_remove(mmu_t mmu, pmap_t pmap, vm_offset_t va, u_i
 
 		/* Remove pv_entry from pv_list. */
 		pv_remove(pmap, va, m);
+	} else if (m->md.pv_tracked) {
+		pv_remove(pmap, va, m);
+		if (TAILQ_EMPTY(&m->md.pv_list))
+			m->md.pv_tracked = false;
 	}
 	mtx_lock_spin(&tlbivax_mutex);
 	tlb_miss_lock();



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