[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] pvops dom0 work roadmap



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.