From owner-svn-src-all@freebsd.org Wed Feb 17 12:31:00 2016 Return-Path: Delivered-To: svn-src-all@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 D4354AAA5F2; Wed, 17 Feb 2016 12:31:00 +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 A76CCC6A; Wed, 17 Feb 2016 12:31:00 +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 u1HCUxfV015971; Wed, 17 Feb 2016 12:30:59 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1HCUxtt015970; Wed, 17 Feb 2016 12:30:59 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201602171230.u1HCUxtt015970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Wed, 17 Feb 2016 12:30:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295693 - 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2016 12:31:00 -0000 Author: skra Date: Wed Feb 17 12:30:59 2016 New Revision: 295693 URL: https://svnweb.freebsd.org/changeset/base/295693 Log: Evaluate also VM_PROT_EXECUTE protection in pmap_preboot_map_attr(). Before this change all mappings done by this function were executable as pte entries have NOT EXECUTABLE bit. The function is used only for static device mappings at present. Thus this is also a fix as DEVICE memory should not be mapped as executable. Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Wed Feb 17 11:40:03 2016 (r295692) +++ head/sys/arm/arm/pmap-v6.c Wed Feb 17 12:30:59 2016 (r295693) @@ -1022,6 +1022,7 @@ pmap_preboot_map_attr(vm_paddr_t pa, vm_ pt2_entry_t *pte2p; l2_prot = prot & VM_PROT_WRITE ? PTE2_AP_KRW : PTE2_AP_KR; + l2_prot |= (prot & VM_PROT_EXECUTE) ? PTE2_X : PTE2_NX; l2_attr = vm_memattr_to_pte2(attr); l1_prot = ATTR_TO_L1(l2_prot); l1_attr = ATTR_TO_L1(l2_attr);