libhsakmt: Add support functions for ASAN
Add support functions to remap the first page of device memory (GPU/GTT) to share host ASAN logic. Signed-off-by: David Yat Sin <David.YatSin@amd.com> Change-Id: I4c27d5417ba80a172dccb0a079a597c5dc1c8f85
Tento commit je obsažen v:
@@ -913,6 +913,30 @@ hsaKmtOpenSMI(
|
||||
int *fd // OUT: anonymous file handle
|
||||
);
|
||||
|
||||
/**
|
||||
If this is GPU Mapped memory, remap the first page at this address to be normal system memory
|
||||
|
||||
This is used in ASAN mode to remap the first page of device memory to share host ASAN logic.
|
||||
This function is only supported when libhsakmt is compiled in ASAN mode.
|
||||
*/
|
||||
HSAKMT_STATUS
|
||||
HSAKMTAPI
|
||||
hsaKmtReplaceAsanHeaderPage(
|
||||
void *addr // IN: Start of othe virtual address page
|
||||
);
|
||||
|
||||
/**
|
||||
If this is GPU Mapped memory, remap the first page back to the original GPU memory
|
||||
|
||||
This is used in ASAN mode to remap the first page back to its original mapping.
|
||||
This function is only supported when libhsakmt is compiled in ASAN mode.
|
||||
*/
|
||||
HSAKMT_STATUS
|
||||
HSAKMTAPI
|
||||
hsaKmtReturnAsanHeaderPage(
|
||||
void *addr // IN: Start of othe virtual address page
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} //extern "C"
|
||||
#endif
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele