x86emul: handle address wrapping for VMASKMOVP{S,D}

I failed to recognize the need to mirror the changes done by 7869e2bafe
("x86emul/fuzz: add rudimentary limit checking") into the earlier
written but later committed 2fe43d333f ("x86emul: support remaining AVX
insns"): Behavior here is the same as for multi-part reads or writes.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Jan Beulich committed 2017-10-11 14:50:33 +02:00
1 parent 6dd2845c64
commit 95d0a0fe37
1 file changed
+2 -2
+2 -2
View File
@@ -7887,7 +7887,7 @@ x86_emulate(
switch ( d & SrcMask )
{
case SrcMem:
rc = ops->read(ea.mem.seg, ea.mem.off + first_byte,
rc = ops->read(ea.mem.seg, truncate_ea(ea.mem.off + first_byte),
(void *)mmvalp + first_byte, op_bytes,
ctxt);
if ( rc != X86EMUL_OKAY )
@@ -7970,7 +7970,7 @@ x86_emulate(
else
{
fail_if(!ops->write);
rc = ops->write(dst.mem.seg, dst.mem.off + first_byte,
rc = ops->write(dst.mem.seg, truncate_ea(dst.mem.off + first_byte),
!state->simd_size ? &dst.val
: (void *)mmvalp + first_byte,
dst.bytes, ctxt);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.