From c58e03c4fcc9d57b1f9dcefc22e406b46040b37a Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Wed, 30 Sep 2026 08:25:49 -0400 Subject: guest-diag: cdt2 payload scan limited to anon mappings (device-mapping reads can block) --- tools/test/cuda_drv_test2.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tools/test') diff --git a/tools/test/cuda_drv_test2.c b/tools/test/cuda_drv_test2.c index d4f848a..98a996e 100644 --- a/tools/test/cuda_drv_test2.c +++ b/tools/test/cuda_drv_test2.c @@ -88,11 +88,12 @@ static void scan_self_for_payload(const char *tag) 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. + * Only scan anonymous mappings: reading file-backed or device + * mappings can SIGBUS (past EOF) or block in a device fault path, + * either of which kills/hangs the client before cuMemcpyDtoH. The + * device mapping list above still reveals any BAR window. */ - if (path[0] && path[0] != '[' && strncmp(path, "/dev/", 5)) + if (path[0] && path[0] != '[') continue; { volatile unsigned long long *p; -- cgit v1.2.3