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
eh: harden is_writable for PAGE_GUARD, multi-region spans, and lazy pages #626
eh::is_writable (used by emulated CLZERO / ClzeroLoop) answers with a single VirtualQuery. That is wrong in four ways (originally listed as item 3 of #278; items 1–2 are on main, item 4 is #321):
PAGE_GUARD.PAGE_READWRITE | PAGE_GUARD (0x104) passes & (PAGE_READWRITE | PAGE_EXECUTE_READWRITE) != 0, so the VEH can write through a guard page instead of letting the real fault happen.
One region only. A ClzeroLoop can cover adjacent committed runs with different protect; one query only sees the first.
Unchecked va + bytes. A wrapping end is undefined.
Lazy physical pages. A page still in MEM_RESERVE (lazy map) makes is_writable false → 0xC000001D, instead of committing via lazy::ensure and zeroing.
Plan
Match the shape of dstorage::writable: checked_add → lazy::ensure → UMA coherent-window fast path → walk every VirtualQuery region covering [va, end), requiring a writable protect and noPAGE_GUARD. Unit tests with VirtualAlloc for guard, multi-region, hole, overflow, and a lazy page.
Complements #501 (sparse-window fast path); does not touch the CLWB race (#321).
Tracking
Split out of #278 item 3 so the fix can land as one small PR.
Activity
eh: harden is_writable for PAGE_GUARD, multi-region spans, lazy pages (…
Grimkaaah commentedon Nov 24, 2026
Complete PR: #523 (rebased, smoke on main + head, lib tests 648 passed).