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] stack protection in mini-os

To: Harald Roeck <hroeck@xxxxxxxxx>
Subject: Re: [Xen-devel] stack protection in mini-os
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Thu, 31 Jul 2008 22:10:14 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 31 Jul 2008 14:11:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <9e53c8b90807311358udea192dl64815be5a1bd1a20@xxxxxxxxxxxxxx>
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>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, Harald Roeck <hroeck@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
References: <9e53c8b90807311358udea192dl64815be5a1bd1a20@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
Hello,

For stubdomains, what I did is to add a check for ESP relative to the
bottom of the stack in a frequently called function, (think about
something like errno_location())

Harald Roeck, le Thu 31 Jul 2008 13:58:36 -0700, a écrit :
> If we overflow the stack and run into the
> mapped out stack page xen crashes and the machine reboots.

Uh, that's bad! Which version of Xen is this with? That is a bug of Xen,
can you reproduce it with a RC of 3.3?

> it looks like xen is trying to push the arguments for the page fault
> trap onto the mapped out page.

Most probably yes, but it should catch the error.

> rbp: 000000000007b120   rsp: 000000000007aff0   r8:  0000000000000010
> ...
> 
> fyi: the read only page in this setup was 0x7a000.

So that's coherent indeed, but I guess you'd like to have the backtrace.

> so my question: is it possible to set an "alternate" trap stack?

I don't think the hypervisor provides this for kernel level.

> or the failsafe_callback?

failsafe_callback is only called when you get a fault during the
execution of callback, not during normal flow.

Samuel

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

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