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

Re: [Xen-devel] pvops dom0 work roadmap

To: M A Young <m.a.young@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] pvops dom0 work roadmap
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Thu, 20 Aug 2009 09:22:41 -0700
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 20 Aug 2009 09:24:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.GSO.2.00.0908201138530.27155@xxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4A8AF65A.2040904@xxxxxxxx> <alpine.GSO.2.00.0908191623160.21647@xxxxxxxxxxxxxxxx> <4A8C268A.2060306@xxxxxxxx> <alpine.LFD.2.00.0908191829490.4622@xxxxxxxxxxxxxxx> <4A8C4D9E.3090607@xxxxxxxx> <alpine.GSO.2.00.0908201138530.27155@xxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3
On 08/20/09 03:43, M A Young wrote:
>> Ah, right, stackprotector.  Please try the patches below (or try current
>> rebase/master).
>
>
> That doesn't help. Perhaps this is because xen_init_irq_ops is in
> irq.c, not enlighten.c though I am at a bit of a loss why
> stackprotector should care about that code segment anyway.

On i386, if %gs hasn't been loaded properly then using it as a base for
a memory access will GP.

Try this:

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 2e58099..3ebcbb2 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -51,6 +51,7 @@
 #include <asm/pgtable.h>
 #include <asm/tlbflush.h>
 #include <asm/reboot.h>
+#include <asm/stackprotector.h>
 
 #include "xen-ops.h"
 #include "mmu.h"
@@ -1013,13 +1014,8 @@ asmlinkage void __init xen_start_kernel(void)
        pv_apic_ops = xen_apic_ops;
        pv_mmu_ops = xen_mmu_ops;
 
-#ifdef CONFIG_X86_64
-       /*
-        * Setup percpu state.  We only need to do this for 64-bit
-        * because 32-bit already has %fs set properly.
-        */
-       load_percpu_segment(0);
-#endif
+       setup_stack_canary_segment(0);
+       switch_to_new_gdt(0);
 
        xen_init_irq_ops();
        xen_init_cpuid_mask();

Thanks,
        J


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