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 | 165ff1128040f5126cd6d296743f625b958caa1b (patch) | |
| tree | 384617cb197ca232f8e11c88040413468e450987 /tools/test/cuda_drv_test2.c | |
| parent | 8d5b96c20a40c06ec2d5fe42b5d182ba17d891e6 (diff) | |
| download | open-iov-165ff1128040f5126cd6d296743f625b958caa1b.tar.gz open-iov-165ff1128040f5126cd6d296743f625b958caa1b.zip | |
guest-diag: cdt2 payload scan only touches anon/device mappings (avoid SIGBUS on truncated file maps)
Diffstat (limited to 'tools/test/cuda_drv_test2.c')
| -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; |
