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-ppc-devel

Re: [XenPPC] [PATCH] Linker script causes SMP memory corruption

To: Amos Waterland <apw@xxxxxxxxxx>
Subject: Re: [XenPPC] [PATCH] Linker script causes SMP memory corruption
From: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Date: Sun, 20 Aug 2006 11:02:44 -0400
Cc: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 20 Aug 2006 08:02:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060819062227.GA3834@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060819062227.GA3834@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
Ahh, this stuff is so wonky it is so easy to miss the _real_ reason :)

On Aug 19, 2006, at 2:22 AM, Amos Waterland wrote:
To understand the context for this patch, observe that the following is
the case in stock Xen/PPC:

 $ nm xen-syms | egrep ' per_cpu__|__per_cpu' | sort
 000000000044c680 d per_cpu__domain_shuttingdown
 000000000044c688 D per_cpu__mc_state
 000000000044c700 d per_cpu__t_timer
 ...
 000000000045cc80 D per_cpu__tlbflush_time
 000000000045d2b0 A __per_cpu_data_end
 000000000045d2b0 A __per_cpu_start
 0000000000460000 A __per_cpu_end

So what is actually happening is that your .data.percpu sections are getting sucked up by the linker before the section description we actually want to be used.

This is the correct fix (possible MUA mangling):

diff -r 539a1e666982 xen/arch/powerpc/xen.lds.S
--- a/xen/arch/powerpc/xen.lds.S        Fri Aug 18 14:07:50 2006 -0400
+++ b/xen/arch/powerpc/xen.lds.S        Sun Aug 20 10:57:46 2006 -0400
@@ -107,7 +107,7 @@ SECTIONS
   PROVIDE (__fini_array_end = .);
   .data           :
   {
-    *(.data .data.* .gnu.linkonce.d.*)
+    *(.data .gnu.linkonce.d.*)
     SORT(CONSTRUCTORS)
   }

this .data.* catch-all got your sections before the one we define even had a chance :)

I'll commit this fix when I fix everything else I broke :-D

-JX


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

<Prev in Thread] Current Thread [Next in Thread>