SWDEV-439234 - Access check before memcpy and kernel operations.
Change-Id: I7057125c03460db205409e19980145298c190fe2
[ROCm/clr commit: 6211037f63]
This commit is contained in:
committato da
Karthik Jayaprakash
parent
29e9bed35d
commit
eecbcddaf3
@@ -545,6 +545,14 @@ Device* Memory::GetDeviceById() {
|
||||
return getContext().devices()[device_idx];
|
||||
}
|
||||
|
||||
// =================================================================================================
|
||||
bool Memory::ValidateMemAccess(const Device& dev, bool read_write) {
|
||||
if (flags_ & CL_MEM_VA_RANGE_AMD) {
|
||||
return dev.ValidateMemAccess(*this, read_write);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Buffer::initDeviceMemory() {
|
||||
deviceMemories_ = reinterpret_cast<DeviceMemory*>(reinterpret_cast<char*>(this) + sizeof(Buffer));
|
||||
memset(deviceMemories_, 0, NumDevicesWithP2P() * sizeof(DeviceMemory));
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user