Anybody know how Windows VirtualProtect timing works across threads? If I call VirtualProtect(...PAGE_READONLY) then set a flag via LOCK OR, is it possible that other threads will see the flag set but still be able to write to the page?
When relaxing protections, it’s a few hundred cycles. When increasing protections, it’s 100,000+ including interrupting each thread via IPI to update page tables. (The answer to the original question above is: yes)