]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: x86: Sysexit emulation does not mask RIP/RSP
authorNadav Amit <namit@cs.technion.ac.il>
Thu, 18 Sep 2014 19:39:45 +0000 (22:39 +0300)
committerJiri Slaby <jslaby@suse.cz>
Mon, 16 Feb 2015 13:46:02 +0000 (14:46 +0100)
commit23b4103455d52e2ffdc4758aea29ba6d70d246ca
treeed4282e71b9dab7d32ff85cdfb1c9f898f7caeca
parent9a4288057afa92094ebc782475a4edba07d0f26e
KVM: x86: Sysexit emulation does not mask RIP/RSP

commit bf0b682c9b6a6d6d54adf439bfe953feef7be2e8 upstream.

If the operand size is not 64-bit, then the sysexit instruction should assign
ECX to RSP and EDX to RIP.  The current code assigns the full 64-bits.

Fix it by masking.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/x86/kvm/emulate.c