fix(libkernel): drop direct mappings when physical backing is released #686
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/686"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Pouare514 on 2026-10-05T15:24:47Z.
What
ForgetDirectMemory erased the physical pages but left g_directMappings entries pointing at the dead backing, so sceKernelVirtualQuery kept reporting is_direct with a stale physical offset after sceKernelReleaseDirectMemory. Erase (and split, on the phys axis) the affected mapping tracking on release. Mapped views are untouched, so no new faults are introduced.
Found during Deathloop streaming triage: the worker crash site sits in code fed by freshly DoMapDirect'd streaming buffers, and a stale is_direct plus phys offset is a candidate contributor to wrong GPU-side addresses. The fix itself is generic lifecycle bookkeeping, not title-specific.
Tested
Checklist