MCPcopy Create free account
hub / github.com/HoShiMin/Kernel-Bridge / InterceptPage

Function InterceptPage

Kernel-Bridge/API/Hypervisor.cpp:1500–1526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1498
1499
1500 bool InterceptPage(
1501 unsigned long long PagePa,
1502 __in_opt unsigned long long OnReadPa,
1503 __in_opt unsigned long long OnWritePa,
1504 __in_opt unsigned long long OnExecutePa,
1505 __in_opt unsigned long long OnExecuteReadPa,
1506 __in_opt unsigned long long OnExecuteWritePa
1507 ) {
1508 struct INTERCEPT_INFO
1509 {
1510 unsigned long long Pa;
1511 unsigned long long R, W, X, RX, WX;
1512 };
1513
1514 INTERCEPT_INFO Info = { PagePa, OnReadPa, OnWritePa, OnExecutePa, OnExecuteReadPa, OnExecuteWritePa };
1515 Callable::DpcOnEachCpu([](void* Arg)
1516 {
1517 VMCALLS::VmmCall([](void* Arg) -> unsigned long long
1518 {
1519 auto* Info = reinterpret_cast<INTERCEPT_INFO*>(Arg);
1520 g_Shared.Processors[KeGetCurrentProcessorNumber()].VmData->EptInterceptor->InterceptPage(Info->Pa, Info->R, Info->W, Info->X, Info->RX, Info->WX);
1521 return 0;
1522 }, Arg);
1523 }, &Info);
1524
1525 return true;
1526 }
1527
1528 void DeinterceptPage(unsigned long long PagePa)
1529 {

Callers 1

KbVmmInterceptPageFunction · 0.85

Calls 4

DpcOnEachCpuFunction · 0.85
VmmCallFunction · 0.85
GetCpuVendorFunction · 0.85
InterceptPageMethod · 0.80

Tested by

no test coverage detected