mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-04-19 13:42:55 +00:00
Prevent bug checks due to race conditions
Zeroing the read access before the write access can result in an ept misconfiguration (page writable, but not readable) if a separate core accesses the same page inbetween the zeroing.
This commit is contained in:
parent
7c1e10d164
commit
ab6e9808b5
@ -101,8 +101,8 @@ namespace vmx
|
||||
{
|
||||
if (watch_point->target_page)
|
||||
{
|
||||
watch_point->target_page->read_access = 0;
|
||||
watch_point->target_page->write_access = 0;
|
||||
watch_point->target_page->read_access = 0;
|
||||
watch_point->target_page->execute_access = 1;
|
||||
}
|
||||
|
||||
@ -261,8 +261,8 @@ namespace vmx
|
||||
if (!violation_qualification.ept_executable && violation_qualification.execute_access)
|
||||
{
|
||||
watch_point->target_page->execute_access = 1;
|
||||
watch_point->target_page->read_access = 0;
|
||||
watch_point->target_page->write_access = 0;
|
||||
watch_point->target_page->read_access = 0;
|
||||
guest_context.increment_rip = false;
|
||||
}
|
||||
else if (violation_qualification.ept_executable && (violation_qualification.read_access ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user