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
This commit is contained in:
parent
6fbc43fdfb
commit
647c87825c
@ -2342,7 +2342,7 @@ verify_gla(struct vm *vm, int cpuid, uint64_t gla, struct vie *vie)
|
||||
* instruction
|
||||
*/
|
||||
if (vie->base_register == VM_REG_GUEST_RIP)
|
||||
base += vie->num_valid;
|
||||
base += vie->num_processed;
|
||||
}
|
||||
|
||||
idx = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user