From: Adar D. <ad...@vm...> - 2009-01-19 10:07:13
|
> The first question is: > what aspect of Virtualization does it test? Something about signals? VmCheck_GetVersion makes the BDOOR_CMD_GETVERSION backdoor call, which, if called within a VMware guest, will cause the vmm to place a "magic" number in register EAX and return control to the guest. > The second question is: > why can't we limit ourselves to only checking the Vmware version by > VmCheck_GetVersion and exit if it returns false? The signal handling code is there because if we're not on a VMware platform, performing the backdoor call will likely trigger a SIGSEGV. We want to handle such cases gracefully so we set up a custom SIGSEGV handler that will jump to just after the call to sigsetjmp if a SIGSEGV is indeed triggered. That lets us correctly report that we're not running under a VMware platform instead of crashing the program using this code. |