Date: Tue, 19 Nov 2013 23:31:40 +0000 (UTC) From: Zbigniew Bodek <zbb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258358 - head/sys/arm/arm Message-ID: <201311192331.rAJNVeJO025224@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: zbb Date: Tue Nov 19 23:31:39 2013 New Revision: 258358 URL: http://svnweb.freebsd.org/changeset/base/258358 Log: Avoid clearing EXEC permission bit when setting the page RW on ARMv6/v7 When emulating modified bit the executable attribute was cleared by mistake when calling pmap_set_prot(). This was not a problem before changes to ref/mod emulation since all the pages were created RW basing on the "prot" argument in pmap_enter(). Now however not all pages are RW and the RW permission can be cleared in the process. Added proper KTRs accordingly. Spotted by: cognet Reviewed by: gber Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Tue Nov 19 22:55:17 2013 (r258357) +++ head/sys/arm/arm/pmap-v6.c Tue Nov 19 23:31:39 2013 (r258358) @@ -1519,10 +1519,10 @@ pmap_fault_fixup(pmap_t pmap, vm_offset_ vm_page_dirty(m); /* Re-enable write permissions for the page */ - pmap_set_prot(ptep, VM_PROT_WRITE, *ptep & L2_S_PROT_U); - CTR1(KTR_PMAP, "pmap_fault_fix: new pte:0x%x", pte); + *ptep = (pte & ~L2_APX); PTE_SYNC(ptep); rv = 1; + CTR1(KTR_PMAP, "pmap_fault_fix: new pte:0x%x", *ptep); } else if (!L2_S_REFERENCED(pte)) { /* * This looks like a good candidate for "page referenced" @@ -1545,6 +1545,7 @@ pmap_fault_fixup(pmap_t pmap, vm_offset_ *ptep = pte | L2_S_REF; PTE_SYNC(ptep); rv = 1; + CTR1(KTR_PMAP, "pmap_fault_fix: new pte:0x%x", *ptep); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311192331.rAJNVeJO025224>