agc: a guest store of the same value can be lost while a native multisample depth publication commits #15600

Open
opened 2026-11-03 21:09:53 +00:00 by oneandonlydean · 0 comments
oneandonlydean commented 2026-11-03 21:09:53 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-11-03T21:09:53Z.


Follow-up from #13021 (merged), which we accepted with this as documented debt.

When a written native multisample D32S8 surface is published to its guest planes, WriteChangedIfHeld CASes each 8-byte word only while the snapshot value is still there, and refuses parts with a CPU stamp or refusal since the generation. The CAS only proves the word's current value. A CPU store of that same value, landing after the generation check and while the part commits, can still be overwritten if the host changes a byte in that word. The author acknowledged this gap in the PR.

What would close it: stronger synchronisation, or a proof that no same-value store can land in that window (for example, a per-part store generation checked under the tracker lock at commit time), plus a test that issues a same-value guest store during a publication.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6191199729 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/15600). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-11-03T21:09:53Z. --- Follow-up from #13021 (merged), which we accepted with this as documented debt. When a written native multisample `D32S8` surface is published to its guest planes, `WriteChangedIfHeld` CASes each 8-byte word only while the snapshot value is still there, and refuses parts with a CPU stamp or refusal since the generation. The CAS only proves the word's current value. A CPU store of that same value, landing after the generation check and while the part commits, can still be overwritten if the host changes a byte in that word. The author acknowledged this gap in the PR. What would close it: stronger synchronisation, or a proof that no same-value store can land in that window (for example, a per-part store generation checked under the tracker lock at commit time), plus a test that issues a same-value guest store during a publication.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#15600
No description provided.