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

[Xen-changelog] [xen-4.1-testing] x86: emulate lea with two register operands correctly



# HG changeset patch
# User David Vrabel <david.vrabel@xxxxxxxxxx>
# Date 1326799924 0
# Node ID a5a9479b07ccd31b342e6f222903e1686f5979d3
# Parent  c358c4213d23212d39a0b95501d843580a66435a
x86: emulate lea with two register operands correctly

An lea instruction with two register operands should raise an
undefined instruction exception.

Skype does such a instruction and will crash when starting if it does
not get the exception.

Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
xen-unstable changeset:   24456:03781de56c31
xen-unstable date:        Thu Jan 05 15:47:16 2012 +0000
---


diff -r c358c4213d23 -r a5a9479b07cc xen/arch/x86/x86_emulate/x86_emulate.c
--- a/xen/arch/x86/x86_emulate/x86_emulate.c    Tue Jan 17 11:31:28 2012 +0000
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c    Tue Jan 17 11:32:04 2012 +0000
@@ -2056,6 +2056,7 @@
     }
 
     case 0x8d: /* lea */
+        generate_exception_if(ea.type != OP_MEM, EXC_UD, -1);
         dst.val = ea.mem.off;
         break;
 

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


 


Rackspace

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