Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

[Xen-devel] Fix 32-bit overflow in 64-bit Xen running 32-bit guest.

To: xen-devel@xxxxxxxxxxxxxxxxxxx, "Woller, Thomas" <thomas.woller@xxxxxxx>
Subject: [Xen-devel] Fix 32-bit overflow in 64-bit Xen running 32-bit guest.
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Wed, 27 Sep 2006 18:52:29 +0200
Delivery-date: Wed, 27 Sep 2006 09:56:16 -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
Thread-index: AcbiVVISp9zfR89xQ0qH0OsPjpPW6g==
Thread-topic: Fix 32-bit overflow in 64-bit Xen running 32-bit guest.
One of our clients found a problem trying to start OS/2 - we get an
overflow when running a 64-bit hypervisor and 32-bit guest if the RIP is
"large" - this should result in a 32-bit value that is truncated, but
instead results in a 33-bit value that causes "strange" results and
eventually a crash of the guest. 

Attached is a proposed patch that fixes the overflow. I'm not sure if
it's worth trying to #if _x86_64_ around it to avoid the extra vmcb
accesses - but if that's worth doing, there would be a bigger gain from
moving this function from emulate.c into a header-file and making it
inline... ;-)

Comments and criticisms welcome... 

Patch is based on 11619. 

--
Mats

Attachment: rip2ptr.patch
Description: rip2ptr.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Fix 32-bit overflow in 64-bit Xen running 32-bit guest., Petersson, Mats <=