You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VM driver re-hashes the 50 MB host supervisor on every launch #6131
host_supervisor_binary calls validate_host_supervisor, which reads and SHA-256-hashes the whole cached host supervisor (about 50 MB) on every sandbox launch, on an async runtime thread. The result does not change between launches unless the file does.
Split out of #6054 (item 3). The first fix proposed in #6056, remembering a good hash keyed on file metadata (path, device, inode, size, mode, mtime, ctime), was withdrawn after review: metadata cannot vouch for contents that a write through a live shared mapping can still change, because mtime/ctime update on the first write fault after writeback, not on every write.
Impact / Why This Matters
Measured on an x86-64 KVM host without SHA instructions, 2 vCPU / 2 GiB guests: about 280 ms between launcher spawned and the host supervisor's start, consistent with software SHA-256 of a 50 MB file (inferred, not profiled). It runs while the guest boots, so today it is mostly hidden, but it becomes the floor of a launch once the guest boots faster, and it holds a runtime thread meanwhile. Smaller on CPUs with SHA instructions.
Acceptance Criteria
A launch does not re-read and re-hash the whole host supervisor when its contents cannot have changed since it was last verified.
Any change to the contents, through any path (rewrite, same-size rewrite, rename/replacement, write through a shared mapping), is still detected before the file is used.
A refused file is never trusted; a driver restart verifies again.
Hashing that does still happen runs off the async runtime threads.
Environment
openshell-driver-vm v0.1.7 (5d25211b); the code path is unchanged on main at 659b45f3b.
Linux x86-64, KVM, libkrun backend, no SHA instructions.
Activity