Date: Fri, 5 Jun 2015 21:22:27 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284046 - head/sys/amd64/vmm Message-ID: <201506052122.t55LMR7u056330@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: neel Date: Fri Jun 5 21:22:26 2015 New Revision: 284046 URL: https://svnweb.freebsd.org/changeset/base/284046 Log: The 'verify_gla()' function is used to ensure that the effective address after decoding the instruction matches the one provided by hardware. Prior to r283293 'vie->num_valid' used to contain the actual length of the instruction whereas now it contains the maximum instruction length possible. This introduced a bug when calculating a RIP-relative base address. Fix this by using 'vie->num_processed' rather than 'vie->num_valid' as the length of the emulated instruction. Reported and tested by: tychon MFC after: 1 week Modified: head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Fri Jun 5 20:38:22 2015 (r284045) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Fri Jun 5 21:22:26 2015 (r284046) @@ -2342,7 +2342,7 @@ verify_gla(struct vm *vm, int cpuid, uin * instruction */ if (vie->base_register == VM_REG_GUEST_RIP) - base += vie->num_valid; + base += vie->num_processed; } idx = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506052122.t55LMR7u056330>