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] Re: [PATCH] xen: Disable stack protector for irq helper

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] xen: Disable stack protector for irq helper
From: Ingo Molnar <mingo@xxxxxxx>
Date: Mon, 12 Oct 2009 22:52:08 +0200
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, Bastian Blank <bastian@xxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Stable Kernel <stable@xxxxxxxxxx>
Delivery-date: Mon, 12 Oct 2009 13:52:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4ACD3346.3010307@xxxxxxxx>
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: <20091004183013.GA26101@xxxxxxxxxxxxxxxxxxxxxxx> <4AC92A65.40806@xxxxxxxx> <20091005013517.GA6081@xxxxxxxxxxxxxxxxxxxxxxx> <4ACA2AFD.4080305@xxxxxxxx> <20091005224310.GA32144@xxxxxxxxxxxxxxxxxxxxxxx> <4ACA90F2.1060909@xxxxxxxx> <20091006033050.GA6332@xxxxxxxxxxxxxxxxxxxxxxx> <4ACB93F8.5010900@xxxxxxxx> <20091007163521.GA17998@xxxxxxxxxxxxxxxxxxxxxxx> <4ACD3346.3010307@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
* Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:

> On 10/07/09 09:35, Bastian Blank wrote:
> > On Tue, Oct 06, 2009 at 12:01:12PM -0700, Jeremy Fitzhardinge wrote:
> >   
> >> On 10/05/09 20:30, Bastian Blank wrote:
> >>     
> >>> The original version saves ecx, but not edx. Both are official
> >>> caller-saved registers.
> >>>       
> >> Hm.  It doesn't save edx because that can be half of a 64-bit return
> >> value, and in general both eax and edx are marked clobbered.
> >>     
> > Then it will be also wrong for functions returning void. They may
> > clobber eax but never set it to something correct.
> >   
> 
> The asm is marked as clobbering eax/edx, so the compiler knows it can't
> rely on them being preserved.  void functions are not expected to
> preserve them either, so it all works out (or if they are, the compiler
> will do the right thing).
> 
> Or did you have something else in mind?
> 
> 
> >>                                                               Except one
> >> place; does the patch below help?
> >>     
> > Don't you need to remove the complete wrapper setup to get a correct
> > result? (And type safety.)
> >   
> 
> Which wrapper?  Do you mean the callee-save function stuff?  Or
> something else?
> 
> It compiles cleanly for me and appears to work.  Does it solve the
> problem for you?
> 
> >>> Well, my call stack say something different. It crashs during early
> >>> startup without a console. The modifications to the function pointers is
> >>> done much later.
> >>>       
> >> You're right.  But you're holding out on me; can I see your backtrace? 
> >>     
> > Well, I'm traveling and it needs some time to recreate a broken kernel.
> >
> >   
> >> And the disassembly of the troublesome code (both the Xen function and
> >> the calling function)?
> >>     
> > That is easy.
> >   
> 
> OK, I see, thanks.

ping - any update about this fix? Since it fixes a real crash it would 
be nice to fix this for .32.

        Ingo

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

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