SWDEV-439234 - Access check before memcpy and kernel operations.

Change-Id: I7057125c03460db205409e19980145298c190fe2


[ROCm/clr commit: 6211037f63]
This commit is contained in:
kjayapra-amd
2024-07-19 10:16:18 -04:00
committed by Karthik Jayaprakash
parent 29e9bed35d
commit eecbcddaf3
9 changed files with 110 additions and 34 deletions
@@ -3517,6 +3517,12 @@ bool VirtualGPU::processMemObjectsHSA(const amd::Kernel& kernel, const_address p
continue;
}
} else {
// Validate Mem Access in case of VMM Memory
if (!memory->ValidateMemAccess(dev(), true)) {
return false;
}
Memory* gpuMemory = dev().getGpuMemory(memory);
if (nullptr != gpuMemory) {
// Synchronize data with other memory instances if necessary