[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx, "Woller, Thomas" <thomas.woller@xxxxxxx>
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • 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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.