From owner-svn-src-head@freebsd.org Tue Nov 10 13:15:35 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE963A2A27F; Tue, 10 Nov 2015 13:15:35 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AF6E18DA; Tue, 10 Nov 2015 13:15:35 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAADFYW3039786; Tue, 10 Nov 2015 13:15:34 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAADFY4Y039785; Tue, 10 Nov 2015 13:15:34 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201511101315.tAADFY4Y039785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Tue, 10 Nov 2015 13:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290655 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 13:15:35 -0000 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__);