docs(bringup): cite the 0600 line correctly and stop Stage 3b on a failed check

The mode is set at gpu_owner.c:1023, not :1009; :1009 is `int error;` and
:1008 is the `struct device *device;` declaration. Measured at this branch's
head rather than carried over from an earlier tree.

The Stage 3b block also lost `set -eu` when the pass conditions replaced the
nvidia-smi checks. Without strict mode a failed insmod, a missing node, or a
failed unbind falls through to the trailing rmmod, and the block can exit 0
without any check having passed. Restore strict mode, and say in the block why
it is there so it is not tidied away again.

Reported-by: JoshyDo
Reported-by: Solarboaters
Signed-off-by: Mara <Mara@K80.dev>
This commit is contained in:
Mara
2026-12-04 15:38:15 +00:00
parent 069ce165b4
commit ab42c01a93

View File

@ -218,11 +218,15 @@ sudo rmmod nvidia_rs
Run this stage in a root shell — `sudo bash`, which keeps your working directory
(`sudo -i` also works but drops you in /root, and every path below is relative to the repo):
the GPU device node is mode 0600
(`kernel-open/nvidia/gpu_owner.c:1009`) and the fd that keeps the runtime alive must live
(`kernel-open/nvidia/gpu_owner.c:1023`) and the fd that keeps the runtime alive must live
in the same shell that runs checks 2-3 — a `sudo sh -c 'exec 9<…'` child would exit and
close it, parking the engines before anything is measured.
```bash
# Strict mode: a failed insmod, a missing node, or a failed unbind must stop
# the stage here - without this the block falls through to the unbind/rmmod
# and can exit 0 without any check having passed.
set -euo pipefail
BDF=0000:01:00.0
insmod kernel-open/nvidia_rs.ko \