summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-30 02:05:53 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-30 02:05:53 -0400
commit40fc44fce89b1053b4445f6b092a2e7c68685284 (patch)
tree7fce28d9c36bf6748d724d174cbc326525e41c96
parentd0d75b59e2f0919d32bd7c79367bbd3f6bb3d56d (diff)
downloadopen-iov-40fc44fce89b1053b4445f6b092a2e7c68685284.tar.gz
open-iov-40fc44fce89b1053b4445f6b092a2e7c68685284.zip
guest-diag: bpz9 - split the failing ucode image create (FUN_003e99d0)
-rw-r--r--tools/guest-diag/bpz9.py55
-rwxr-xr-xtools/guest-diag/push_guest_tools.sh1
2 files changed, 56 insertions, 0 deletions
diff --git a/tools/guest-diag/bpz9.py b/tools/guest-diag/bpz9.py
new file mode 100644
index 0000000..06c5d96
--- /dev/null
+++ b/tools/guest-diag/bpz9.py
@@ -0,0 +1,55 @@
+# gdb script: split the failing ucode image create (FUN_003e99d0).
+#
+# Run #9: FUN_00e21850 -> FUN_003e99d0 returned 1 for the membar-WAR blob.
+# FUN_003e99d0 (file 0x2e99d0) calls FUN_003d1e70 (blob parse) at 0x2e9a1e
+# and on success FUN_003e90c0 at 0x2e9a3a; break after each and stop on the
+# first non-zero status.
+#
+# Run: sudo gdb -p <cdt-pid> -batch -x /tmp/bpz9.py
+import gdb
+import time
+
+out = gdb.execute("info proc mappings", to_string=True)
+base = None
+for line in out.splitlines():
+ if "libcuda" in line and "r-xp" in line:
+ f = line.split()
+ base = int(f[0], 16) - int(f[3], 16)
+ break
+print("BASE=0x%x" % (base or 0))
+if base is None:
+ raise SystemExit
+
+gdb.execute("set pagination off")
+gdb.execute("set confirm off")
+SITES = [
+ (0x2e9a23, "PARSE_RET"),
+ (0x2e9a3f, "CREATE2_RET"),
+]
+for off, name in SITES:
+ gdb.execute("break *0x%x" % (base + off))
+
+t0 = time.time()
+for hit in range(60):
+ try:
+ gdb.execute("continue")
+ except gdb.error as e:
+ print("CONTINUE_END %s" % e)
+ break
+ rip = int(gdb.parse_and_eval("$rip")) & 0xffffffffffffffff
+ off = rip - base
+ name = dict(SITES).get(off, "?")
+ eax = int(gdb.parse_and_eval("$eax")) & 0xffffffff
+ print("HIT t=%.3f off=0x%x %s eax=0x%x" % (time.time() - t0, off, name, eax))
+ if eax != 0:
+ print(" >>> FAILED STEP %s status=0x%x" % (name, eax))
+ try:
+ print(gdb.execute("bt 10", to_string=True))
+ except Exception as e:
+ print("bt_fail %s" % e)
+ break
+
+try:
+ gdb.execute("detach")
+except Exception:
+ pass
diff --git a/tools/guest-diag/push_guest_tools.sh b/tools/guest-diag/push_guest_tools.sh
index 4bfc15a..2bcf9a7 100755
--- a/tools/guest-diag/push_guest_tools.sh
+++ b/tools/guest-diag/push_guest_tools.sh
@@ -36,6 +36,7 @@ push_b64 "$HERE/bpz5.py" /tmp/bpz5.py
push_b64 "$HERE/bpz6.py" /tmp/bpz6.py
push_b64 "$HERE/bpz7.py" /tmp/bpz7.py
push_b64 "$HERE/bpz8.py" /tmp/bpz8.py
+push_b64 "$HERE/bpz9.py" /tmp/bpz9.py
push_b64 "$HERE/invd.py" /tmp/invd.py
push_b64 "$HERE/bpwait.py" /tmp/bpwait.py
push_b64 "$HERE/ctx999.py" /tmp/ctx999.py