]> xenbits.xensource.com Git - xen.git/commit
x86/HVM: don't crash guest in hvmemul_find_mmio_cache()
authorJan Beulich <jbeulich@suse.com>
Tue, 12 Mar 2019 13:39:46 +0000 (14:39 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Mar 2019 13:39:46 +0000 (14:39 +0100)
commita43c1dec246bdee484e6a3de001cc6850a107abe
tree373189857f4d3e92efcda52c556705b11a71631b
parentb49225dc9df336405292dc08862b4c7c9d887bd6
x86/HVM: don't crash guest in hvmemul_find_mmio_cache()

Commit 35a61c05ea ("x86emul: adjust handling of AVX2 gathers") builds
upon the fact that the domain will actually survive running out of MMIO
result buffer space. Drop the domain_crash() invocation. Also delay
incrementing of the usage counter, such that the function can't possibly
use/return an out-of-bounds slot/pointer in case execution subsequently
makes it into the function again without a prior reset of state.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
xen/arch/x86/hvm/emulate.c