struct DiagPerPageState {
expected: Option<&'static [ExpectedPageHash]>,
seen: u32,
bad: u32,
overflow: bool,
bitmap: [u64; 512],
saved_count: u32,
saved: [DiagSavedBadPage; 3],
}Expand description
Per-page expected-hash tracking state. Populated during Phase A capture as each 4 KB shared page is compared against the loader’s per-page SHA-384 baked into the measured expected-page-hashes region.
Fields§
§expected: Option<&'static [ExpectedPageHash]>Cached slice from ShimParams::expected_page_hashes(). None if
the IGVM has no expected-page-hashes region (older loader) or the
region magic/version mismatched – per-page compare is disabled.
seen: u32Number of 4 KB pages Phase A has processed so far.
bad: u32Number of pages whose Phase A hash did not match expected[i].
overflow: boolTrue if the shim hashed more pages than the loader emitted hashes for; per-page compare stops for the tail of the walk when this flips true.
bitmap: [u64; 512]Bitmap of mismatched pages indexed by shim page index (bit i set
= page i differed from expected[i]). Capped at
DIAG_MAX_HASH_PAGES positions – anything beyond is not
tracked in the bitmap (still counted in bad).
saved_count: u32Number of entries populated in saved.
saved: [DiagSavedBadPage; 3]Full 4 KB contents of the first DIAG_MAX_SAVED_BAD_PAGES bad
pages, so we can hex-dump them for byte-level inspection.