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
[ROCm/ROCR-Runtime commit: 1e6d728730]
이 커밋은 다음에 포함됨:
1 부모
4d26b1cf48
커밋
a868d0972b
5 파일이 변경됨
+140
-1
검색과 일치하는 파일 없음
@@ -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
|
||||
|
||||
새 이슈에서 참조
사용자 차단