Files
vm/Cargo.toml
zeekayandHanzo Dev 605b0dc7f3 measure: a launch, stated as a number, bound to what would sign for it
A boot is now an ordered log of what the hypervisor was handed — kernel,
command line, initrd where one is used, root image, machine shape — folded
into one extend-only SHA-384 register. The fold is the rule TDX applies to
an RTMR, and SHA-384 is the digest both TDX registers and the SEV-SNP launch
measurement use, so nothing is re-hashed at the boundary to hardware.

Only content enters a digest. A path is printed for the reader and never
hashed, so the same assets measure identically everywhere and a file digest
is an ordinary `shasum -a 384`. Digests are remembered against each image's
device, inode, length and mtime: 19 s of reading a 4 GB root image becomes
9 ms, warmed where a slow path is already being paid (after a download,
after a checkpoint save).

`hanzo-vm measure` states a launch without performing one. `run --stdio`
reports the launch log before it says `ready` — over the source images,
taken before anything is cloned — so a driver measures what it received
rather than what it asked for, and extends a second register with whatever
it deploys.

SHA-512(launch ‖ workload) is 64 bytes, the width of REPORT_DATA in an
SEV-SNP report and of a TDX TDREPORT's report data. ATTEST_REQ carries
exactly those bytes to the guest, which asks /dev/sev-guest or
/dev/tdx_guest and answers with what the platform said. The ask is
guest-side because that is the only side those devices exist on; a report
from the host would answer a different question. What is missing is
hardware: an SNP- or TDX-capable VMM on EPYC or Xeon. The ioctl numbers and
structure sizes are pinned by tests against the kernel headers, which is the
part a machine without the hardware can still check.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-05 22:54:49 -07:00

36 lines
755 B
TOML

[workspace]
resolver = "2"
members = [
"crates/vm-cli",
"crates/vm-darwin",
"crates/vm-linux",
"crates/vm-ch",
"crates/vm-proto",
"crates/vm-proxy",
"crates/vm-sdk",
"crates/vm",
"crates/vm-store",
"crates/vm-guest",
"crates/vm-measure",
]
# vm-darwin and vm-linux are platform-specific — only pulled in
# transitively via vm's cfg'd deps. Excluded from default builds
# so `cargo check` doesn't fail on the wrong OS.
default-members = [
"crates/vm-cli",
"crates/vm-proto",
"crates/vm-proxy",
"crates/vm-sdk",
"crates/vm",
"crates/vm-store",
"crates/vm-guest",
"crates/vm-measure",
]
[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
strip = true