[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86_emulate: raise #UD rather than #GP on invalid use of LOCK prefix
# HG changeset patch # User Andrew Cooper <andrew.cooper3@xxxxxxxxxx> # Date 1332535516 0 # Node ID 2e45b26bc412099a2b8f009bcf111e4b6c23847b # Parent 2ca43b65718fbe2d3f9ea36132e139ef774d9a11 x86_emulate: raise #UD rather than #GP on invalid use of LOCK prefix From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Signed-off-by: Keir Fraser <keir@xxxxxxx> Committed-by: Keir Fraser <keir@xxxxxxx> --- diff -r 2ca43b65718f -r 2e45b26bc412 xen/arch/x86/x86_emulate/x86_emulate.c --- a/xen/arch/x86/x86_emulate/x86_emulate.c Fri Mar 23 16:13:29 2012 +0100 +++ b/xen/arch/x86/x86_emulate/x86_emulate.c Fri Mar 23 20:45:16 2012 +0000 @@ -1429,7 +1429,7 @@ } /* Lock prefix is allowed only on RMW instructions. */ - generate_exception_if((d & Mov) && lock_prefix, EXC_GP, 0); + generate_exception_if((d & Mov) && lock_prefix, EXC_UD, 0); /* ModRM and SIB bytes. */ if ( d & ModRM ) @@ -1712,12 +1712,12 @@ lock_prefix && ((b < 0x20) || (b > 0x23)) && /* MOV CRn/DRn */ (b != 0xc7), /* CMPXCHG{8,16}B */ - EXC_GP, 0); + EXC_UD, 0); dst.type = OP_NONE; break; case DstReg: - generate_exception_if(lock_prefix, EXC_GP, 0); + generate_exception_if(lock_prefix, EXC_UD, 0); dst.type = OP_REG; if ( d & ByteOp ) { @@ -1773,7 +1773,7 @@ dst = ea; if ( dst.type == OP_REG ) { - generate_exception_if(lock_prefix, EXC_GP, 0); + generate_exception_if(lock_prefix, EXC_UD, 0); switch ( dst.bytes ) { case 1: dst.val = *(uint8_t *)dst.reg; break; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |