diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-30 10:14:09 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-30 10:14:09 -0400 |
| commit | e4f0796024995cd2438bd087fd720aa3597cf4f3 (patch) | |
| tree | 7da3747e86312b66c3570936441d4b0f12f1b195 /tools/guest-diag | |
| parent | 53698e3b8ecfe7da2f86eb783378bbac006ec19d (diff) | |
| download | open-iov-e4f0796024995cd2438bd087fd720aa3597cf4f3.tar.gz open-iov-e4f0796024995cd2438bd087fd720aa3597cf4f3.zip | |
guest-diag: mount tracefs before installing kprobes
A fresh boot can leave /sys/kernel/tracing as an unmounted mount point;
the probe adds then fail silently (probe count 0) and the whole sem/kptr
pipeline goes blind.
Diffstat (limited to 'tools/guest-diag')
| -rw-r--r-- | tools/guest-diag/guest_kprobes.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/guest-diag/guest_kprobes.sh b/tools/guest-diag/guest_kprobes.sh index 3f28b29..75b2ba3 100644 --- a/tools/guest-diag/guest_kprobes.sh +++ b/tools/guest-diag/guest_kprobes.sh @@ -14,6 +14,13 @@ TR=/sys/kernel/tracing [ -d "$TR" ] || TR=/sys/kernel/debug/tracing +# A fresh boot may leave tracefs unmounted even though the mount point exists +# (observed: mkdir of events/kprobes/enable fails with "Directory +# nonexistent" and every probe add fails silently). Mount it if needed. +if [ ! -d "$TR/events" ]; then + mount -t tracefs tracefs "$TR" 2>/dev/null || \ + mount -t debugfs debugfs "$TR" 2>/dev/null || true +fi # An enabled kprobe event cannot be deleted (EBUSY); disable the group first. echo 0 > "$TR/events/kprobes/enable" 2>/dev/null || true |
