From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: pvops dom0 work roadmap Date: Thu, 20 Aug 2009 09:22:41 -0700 Message-ID: <4A8D7851.7070702@goop.org> References: <4A8AF65A.2040904@goop.org> <4A8C268A.2060306@goop.org> <4A8C4D9E.3090607@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: M A Young Cc: Xen-devel List-Id: xen-devel@lists.xenproject.org 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 #include #include +#include #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