diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-30 08:08:32 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-30 08:08:32 -0400 |
| commit | 662912d8961ec73e1cbc2b4f0903627c242cf9d6 (patch) | |
| tree | 0611184cb8f150ebbd7c9ec428d81947e84242cc /tools | |
| parent | 0ffc3bf8effd69af2910ad38294cb99894c6b44b (diff) | |
| download | open-iov-662912d8961ec73e1cbc2b4f0903627c242cf9d6.tar.gz open-iov-662912d8961ec73e1cbc2b4f0903627c242cf9d6.zip | |
guest-diag: cdt2 payload scan only touches anon/device mappings (avoid SIGBUS on truncated file maps)
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/test/cuda_drv_test2.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/test/cuda_drv_test2.c b/tools/test/cuda_drv_test2.c index cfe21d8..d4f848a 100644 --- a/tools/test/cuda_drv_test2.c +++ b/tools/test/cuda_drv_test2.c @@ -87,6 +87,13 @@ static void scan_self_for_payload(const char *tag) perms, off, path); if (perms[0] != 'r' || b <= a || b - a > (512ULL << 20)) continue; + /* + * Only scan anonymous and device mappings: reading a truncated + * file-backed mapping past EOF raises SIGBUS and killed the client + * silently before cuMemcpyDtoH. + */ + if (path[0] && path[0] != '[' && strncmp(path, "/dev/", 5)) + continue; { volatile unsigned long long *p; for (p = (volatile unsigned long long *)a; |
