4 Commits

Author SHA1 Message Date
df75b91442 fix(tools): fail on unsaved trace, reject non-finite timeout, reset find window on malformed row, and mock geteuid 2026-12-02 23:13:23 -08:00
4b119cc5ca Address Greptile findings on #258
- tools/summarize_native_hello.py (4777570792): validate stdout 'text' and
  ioctl 'synchronous_api' field types via require_capture() before joining or
  counting so malformed captures exit cleanly with Rejected capture.
- tools/capture_original_init_kernel.py & tests/offline/test_mmiotrace_vm_and_summary_tools.py
  (4777570793): add regression tests covering malformed stdout/synchronous_api
  captures and trace-read + single-probe disable failures verifying every probe
  is disabled before removal.
2026-12-02 17:14:10 -08:00
aad78e8063 tools: harden mmiotrace/register/summary/kprobe and QEMU EDU runner tools
- tools/analyze_mmiotrace.py: skip malformed resource/trace lines cleanly, reject empty --find patterns (avoiding IndexError) and negative --first-writes, accept uppercase hex in --find, create output parent dirs, wrap CLI in main().
- tools/read_gpu_registers.py: check BAR0 size before mmap, handle missing sysfs driver/power_state cleanly, create output parent dirs, wrap CLI in main().
- tools/summarize_native_hello.py: validate JSON/payload hex/lengths cleanly via require_capture instead of raw KeyError/struct.error/JSONDecodeError, create output parent dirs, wrap CLI in main().
- tools/vm/run_guest.py: handle both bytes and str on TimeoutExpired, validate NV_RS_VM_RAM_MB and required VM artifacts before launch, wrap CLI in main().
- tools/vm/verify_rust_guest.py: use exact nm symbol matching for vm_rust_backing, fail cleanly on missing artifacts/rustc/RUSTFLAGS, exit with status code instead of assert (which python3 -O strips), wrap in main().
- tools/capture_original_init_kernel.py: open kprobe_events with O_APPEND, isolate trace-read errors from per-probe disable so kprobes are always disabled before removal (preventing EBUSY leaks), validate --pid/--timeout/euid without assert, guard kprobe_events verification reads, wrap in main().
- tests/offline/test_mmiotrace_vm_and_summary_tools.py: 6 offline unit tests.
2026-12-02 02:44:09 -08:00
4526e6a816 Baseline: validated 30/30 tree with passing Level 7 hardware regression
- Updated tools/post_reboot.sh to check kernel oops taint bit and stuck driver tasks instead of <86400s uptime
- Level 7 hardware regression passed on 0000:b3:00.0 (module 37e6fa430835eee2b426019db3ad70eeb7a9e9070c09c84bd9b973cf56cbe529, 107 inventory words, 0 static mismatches, CUDA baseline verified before and after)
- Updated .gitignore to exclude build archives (*.a, *.rlib), __pycache__, and raw trace dumps
2026-11-23 23:48:38 +00:00