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] Fix loop iterator aliasing in x86/32 memory initialisati

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix loop iterator aliasing in x86/32 memory initialisation.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Aug 2005 17:52:11 -0400
Delivery-date: Thu, 11 Aug 2005 21:52:40 +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 5ec5f6960507cf731a53beb593c1e18e538036b2
# Parent  57b3fdca5daed68d14c073be1dc5b813a2841ed4
Fix loop iterator aliasing in x86/32 memory initialisation.
Signed-off-by: Jerone Young <jyoung5@xxxxxxxxxx>

diff -r 57b3fdca5dae -r 5ec5f6960507 xen/arch/x86/x86_32/mm.c
--- a/xen/arch/x86/x86_32/mm.c  Thu Aug 11 21:38:58 2005
+++ b/xen/arch/x86/x86_32/mm.c  Thu Aug 11 21:52:22 2005
@@ -150,7 +150,7 @@
 void subarch_init_memory(struct domain *dom_xen)
 {
     unsigned long m2p_start_mfn;
-    int i;
+    unsigned int i, j;
 
     /*
      * We are rather picky about the layout of 'struct pfn_info'. The
@@ -174,12 +174,12 @@
     {
         m2p_start_mfn = l2e_get_pfn(
             idle_pg_table_l2[l2_linear_offset(RDWR_MPT_VIRT_START) + i]);
-        for ( i = 0; i < L2_PAGETABLE_ENTRIES; i++ )
+        for ( j = 0; j < L2_PAGETABLE_ENTRIES; j++ )
         {
-            frame_table[m2p_start_mfn+i].count_info = PGC_allocated | 1;
+            frame_table[m2p_start_mfn+j].count_info = PGC_allocated | 1;
             /* Ensure it's only mapped read-only by domains. */
-            frame_table[m2p_start_mfn+i].u.inuse.type_info = PGT_gdt_page | 1;
-            page_set_owner(&frame_table[m2p_start_mfn+i], dom_xen);
+            frame_table[m2p_start_mfn+j].u.inuse.type_info = PGT_gdt_page | 1;
+            page_set_owner(&frame_table[m2p_start_mfn+j], dom_xen);
         }
     }
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix loop iterator aliasing in x86/32 memory initialisation., Xen patchbot -unstable <=