]> xenbits.xensource.com Git - xen.git/commit
x86/hvm: Fixes to hvmemul_insn_fetch()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 9 May 2017 14:31:54 +0000 (15:31 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 19 Jul 2017 09:25:18 +0000 (10:25 +0100)
commit0943a03037418e6e40cdd420f2472bbf9afae7a2
tree2e40eab830d2bac7ebc3cbf32ecb469489dc02b2
parentab48596654ca20bd45eee4bdc1252188e9beb5a5
x86/hvm: Fixes to hvmemul_insn_fetch()

Force insn_off to a single byte, as offset can wrap around or truncate with
respect to sh_ctxt->insn_buf_eip under a number of normal circumstances.

Furthermore, don't use an ASSERT() for bounds checking the write into
hvmemul_ctxt->insn_buf[].

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