diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-30 02:05:53 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-30 02:05:53 -0400 |
| commit | 6fd923c76fe40bbb04d737d695e33a72d3b21889 (patch) | |
| tree | b75e0d981d318583a2314d1667bd2981cc94d084 /tools | |
| parent | 86915397e51583514f2330a4976e1e0bad6e81c8 (diff) | |
| download | open-iov-6fd923c76fe40bbb04d737d695e33a72d3b21889.tar.gz open-iov-6fd923c76fe40bbb04d737d695e33a72d3b21889.zip | |
guest-diag: bpz9 - split the failing ucode image create (FUN_003e99d0)
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/guest-diag/bpz9.py | 55 | ||||
| -rwxr-xr-x | tools/guest-diag/push_guest_tools.sh | 1 |
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 |
