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/
Home Products Support Community News


[Xen-devel] [PATCH] fix xspy stack corruption

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] fix xspy stack corruption
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Thu, 13 Apr 2006 18:35:18 +0100
Delivery-date: Thu, 13 Apr 2006 10:35:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
This was fun to find... we were unlucky enough for the corruption to
zero out the bottom 2 bytes of the saved %ebp.


# HG changeset patch
# User john.levon@xxxxxxx
# Node ID 09a9fd49601b9b5315843eb62ad7798ccb0ccd0d
# Parent  2a7a46dd3bd6a600deee21990aef41456cba9724
Fix stack corruption in the libxs python interface. domid_t is a short;
instead use uint32_t like we do in xc.c.

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff -r 2a7a46dd3bd6 -r 09a9fd49601b tools/python/xen/lowlevel/xs/xs.c
--- a/tools/python/xen/lowlevel/xs/xs.c Thu Apr 13 11:26:01 2006 +0100
+++ b/tools/python/xen/lowlevel/xs/xs.c Thu Apr 13 09:17:48 2006 -0700
@@ -589,7 +589,7 @@ static PyObject *xspy_transaction_end(Xs
 static PyObject *xspy_introduce_domain(XsHandle *self, PyObject *args)
-    domid_t dom;
+    uint32_t dom;
     unsigned long page;
     unsigned int port;
@@ -620,7 +620,7 @@ static PyObject *xspy_introduce_domain(X
 static PyObject *xspy_release_domain(XsHandle *self, PyObject *args)
-    domid_t dom;
+    uint32_t dom;
     struct xs_handle *xh = xshandle(self);
     bool result = 0;
@@ -677,7 +677,7 @@ static PyObject *xspy_get_domain_path(Xs
 static PyObject *xspy_get_domain_path(XsHandle *self, PyObject *args)
     struct xs_handle *xh = xshandle(self);
-    int domid;
+    uint32_t domid;
     char *xsval;
     if (!xh)

Xen-devel mailing list

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