MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / CheckRegion

Function CheckRegion

Kernel/src/arch/x86_64/paging.cpp:184–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182 }
183
184 bool CheckRegion(uintptr_t addr, uint64_t len, address_space_t* addressSpace){
185 return addr < PDPT_SIZE && (addr + len) < PDPT_SIZE && (addressSpace->pdpt[PDPT_GET_INDEX(addr)] & PDPT_USER) && (addressSpace->pdpt[PDPT_GET_INDEX(addr + len)] & PDPT_USER);
186 }
187
188 bool CheckKernelPointer(uintptr_t addr, uint64_t len){
189 if(PML4_GET_INDEX(addr) != PML4_GET_INDEX(KERNEL_VIRTUAL_BASE)){

Callers 3

SysMmapFunction · 0.85
SysMunmapFunction · 0.85
SysUnmapSharedMemoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected