From mboxrd@z Thu Jan 1 00:00:00 1970 From: stefano.stabellini@eu.citrix.com Subject: [PATCH 1/4] xen: mask_rw_pte mark RO all pagetable pages up to pgt_buf_top Date: Tue, 12 Apr 2011 12:19:49 +0100 Message-ID: <1302607192-21355-1-git-send-email-stefano.stabellini@eu.citrix.com> References: Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: linux-kernel@vger.kernel.org Cc: xen-devel@lists.xensource.com, konrad.wilk@oracle.com, jeremy@goop.org, Stefano.Stabellini@eu.citrix.com, yinghai@kernel.org, hpa@linux.intel.com, mingo@elte.hu, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org From: Stefano Stabellini mask_rw_pte is currently checking if a pfn is a pagetable page if it falls in the range pgt_buf_start - pgt_buf_end but that is incorrect because pgt_buf_end is a moving target: pgt_buf_top is the real boundary. Signed-off-by: Stefano Stabellini --- arch/x86/xen/mmu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index c82df6c..6b833db 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -1491,7 +1491,7 @@ static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte) * it is RO. */ if (((!is_early_ioremap_ptep(ptep) && - pfn >= pgt_buf_start && pfn < pgt_buf_end)) || + pfn >= pgt_buf_start && pfn < pgt_buf_top)) || (is_early_ioremap_ptep(ptep) && pfn != (pgt_buf_end - 1))) pte = pte_wrprotect(pte); -- 1.7.2.3