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

[Xen-changelog] [xen stable-4.8] x86emul: CMPXCHG16B requires an aligned operand



commit 67e96796f438484cbe0e5829a42b107bdcabd5b9
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Jan 18 09:49:26 2017 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Jan 18 09:49:26 2017 +0100

    x86emul: CMPXCHG16B requires an aligned operand
    
    This distinguishes it from CMPXCHG8B.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    master commit: d7d3a82c28a1102ee6c9707071a946164bae0d57
    master date: 2016-12-16 14:37:11 +0100
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c 
b/xen/arch/x86/x86_emulate/x86_emulate.c
index ccaffca..6bb3c74 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -5287,6 +5287,9 @@ x86_emulate(
         if ( op_bytes == 8 )
         {
             host_and_vcpu_must_have(cx16);
+            generate_exception_if(!is_aligned(ea.mem.seg, ea.mem.off, 16,
+                                              ctxt, ops),
+                                  EXC_GP, 0);
             op_bytes = 16;
         }
         else
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.8

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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