Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Nov 2015 13:15:34 +0000 (UTC)
From:      Svatopluk Kraus <skra@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r290655 - head/sys/arm/arm
Message-ID:  <201511101315.tAADFY4Y039785@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: skra
Date: Tue Nov 10 13:15:34 2015
New Revision: 290655
URL: https://svnweb.freebsd.org/changeset/base/290655

Log:
  Fix pmap_fault(). It turned out that alignment abort may have higher
  priority than both translation and permission ones.
  
  Approved by:	kib (mentor)

Modified:
  head/sys/arm/arm/pmap-v6-new.c

Modified: head/sys/arm/arm/pmap-v6-new.c
==============================================================================
--- head/sys/arm/arm/pmap-v6-new.c	Tue Nov 10 13:11:22 2015	(r290654)
+++ head/sys/arm/arm/pmap-v6-new.c	Tue Nov 10 13:15:34 2015	(r290655)
@@ -6152,8 +6152,9 @@ pmap_fault(pmap_t pmap, vm_offset_t far,
 		 * All L1 tables should always be mapped and present.
 		 * However, we check only current one herein. For user mode,
 		 * only permission abort from malicious user is not fatal.
+		 * And alignment abort as it may have higher priority.
 		 */
-		if (!usermode || (idx != FAULT_PERM_L2)) {
+		if (!usermode || (idx != FAULT_ALIGN && idx != FAULT_PERM_L2)) {
 			CTR4(KTR_PMAP, "%s: pmap %#x pm_pt1 %#x far %#x",
 			    __func__, pmap, pmap->pm_pt1, far);
 			panic("%s: pm_pt1 abort", __func__);
@@ -6166,9 +6167,10 @@ pmap_fault(pmap_t pmap, vm_offset_t far,
 		 * L1 table. However, only existing L2 tables are mapped
 		 * in PT2MAP. For user mode, only L2 translation abort and
 		 * permission abort from malicious user is not fatal.
+		 * And alignment abort as it may have higher priority.
 		 */
-		if (!usermode ||
-		    (idx != FAULT_TRAN_L2 && idx != FAULT_PERM_L2)) {
+		if (!usermode || (idx != FAULT_ALIGN &&
+		    idx != FAULT_TRAN_L2 && idx != FAULT_PERM_L2)) {
 			CTR4(KTR_PMAP, "%s: pmap %#x PT2MAP %#x far %#x",
 			    __func__, pmap, PT2MAP, far);
 			panic("%s: PT2MAP abort", __func__);



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