WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] make_page_readonly() must flush unused kmaps when handli

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] make_page_readonly() must flush unused kmaps when handling
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Nov 2005 20:14:17 +0000
Delivery-date: Fri, 18 Nov 2005 20:15:49 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 0970a2fdbee95d74d47d6489a8262814a0d2b3c5
# Parent  8b384e7413827c381924cc741c818a5f33ed2ca2
make_page_readonly() must flush unused kmaps when handling
a high-memory page. Otherwise stale writable mappings may 
persist. This fixes a corner case for alloc_ldt (which can
vmalloc an LDT and hence use highmem pages).

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 8b384e741382 -r 0970a2fdbee9 
linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c   Fri Nov 18 16:42:45 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c   Fri Nov 18 16:50:25 2005
@@ -409,7 +409,9 @@
        if ((unsigned long)va >= (unsigned long)high_memory) {
                unsigned long pfn = pte_pfn(*pte);
 #ifdef CONFIG_HIGHMEM
-               if (pfn < highstart_pfn)
+               if (pfn >= highstart_pfn)
+                       kmap_flush_unused(); /* flush stale writable kmaps */
+               else
 #endif
                        make_lowmem_page_readonly(
                                phys_to_virt(pfn << PAGE_SHIFT)); 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] make_page_readonly() must flush unused kmaps when handling, Xen patchbot -unstable <=