Revert "Revert "hsakmt: Only set exec flag when requested""
This reverts commit 80da7d5ee4.
Reason for revert: This will put back the change ID - Id1154f08f6ba21c633905fd46b06053994d6f3cc to ROCR repo, which will prevent memory allocations from being automatically granted the 'executable' flag, addressing previously - incorrect and unsafe behavior in ROCm driver.
Change-Id: I3d45c45859929a80f7791681b411251e099a1901
This commit is contained in:
committato da
David Yat Sin
parent
5d8fba133d
commit
2d4a578020
+2
-5
@@ -1401,11 +1401,8 @@ static uint32_t fmm_translate_hsa_to_ioc_flags(HsaMemFlags flags)
|
||||
KFD_IOC_ALLOC_MEM_FLAGS_UNCACHED);
|
||||
if (!flags.ui32.ReadOnly)
|
||||
ioc_flags |= KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE;
|
||||
/* TODO: Since, ROCr interfaces doesn't allow caller to set page
|
||||
* permissions, mark all user allocations with exec permission.
|
||||
* Check for flags.ui32.ExecuteAccess once ROCr is ready.
|
||||
*/
|
||||
ioc_flags |= KFD_IOC_ALLOC_MEM_FLAGS_EXECUTABLE;
|
||||
if (flags.ui32.ExecuteAccess)
|
||||
ioc_flags |= KFD_IOC_ALLOC_MEM_FLAGS_EXECUTABLE;
|
||||
return ioc_flags;
|
||||
}
|
||||
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user