summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskra <skra@FreeBSD.org>2015-11-10 13:15:34 +0000
committerskra <skra@FreeBSD.org>2015-11-10 13:15:34 +0000
commit52ec41c2738e79ec12e3a00568d40b18ebe0605c (patch)
treec3f5113c1689d6d6eb0ea596d5e3b87e2ebacfa6
parentc3b272f1a0d7097486637a096be47a70be2557c0 (diff)
downloadFreeBSD-src-52ec41c2738e79ec12e3a00568d40b18ebe0605c.zip
FreeBSD-src-52ec41c2738e79ec12e3a00568d40b18ebe0605c.tar.gz
Fix pmap_fault(). It turned out that alignment abort may have higher
priority than both translation and permission ones. Approved by: kib (mentor)
-rw-r--r--sys/arm/arm/pmap-v6-new.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arm/arm/pmap-v6-new.c b/sys/arm/arm/pmap-v6-new.c
index 729603c..71595fc 100644
--- a/sys/arm/arm/pmap-v6-new.c
+++ b/sys/arm/arm/pmap-v6-new.c
@@ -6152,8 +6152,9 @@ pmap_fault(pmap_t pmap, vm_offset_t far, uint32_t fsr, int idx, bool usermode)
* 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, uint32_t fsr, int idx, bool usermode)
* 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__);
OpenPOWER on IntegriCloud