mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-12-05 09:01:25 +00:00
2.1 KiB
2.1 KiB
libkernel
change (libkernel, Windows) - named objects are regular files in the current user
- shm_open, shm_unlink (libkernel, Windows) - named objects are regular files in the current user's temporary directory under
AnyPS5-shm-<SID>-elevatedorAnyPS5-shm-<SID>-unelevated, identified by SHA-1 of the exact guest name. Processes with the same user SID and token elevation state share objects, so two titles using the same name share the object; elevated and UAC-filtered processes do not share. Namespace operations use a cross-session named mutex, while file-size changes and writes use a mutex keyed by the host file identity; unlink renames the visible object to a unique internal name so already-open handles remain usable while the guest name can be recreated. Orphaned files are reaped when the last tracked guest descriptor closes or opportunistically during a later open. Closing through host stdio wrappers does not update this bookkeeping or reap immediately. The namespace directory has a protected ACL for the owner, SYSTEM and Administrators; newly created objects map the guest owner read/write bits after applying the guest creation mask.fchmodupdates those owner permissions on the descriptor's file object. Guest group/other permission classes are not represented independently on Windows. The owner's read permission also grants execute, so a read-only descriptor can be mappedPROT_EXECas FreeBSD 11.4'sshm_mmapallows; objects created by earlier builds lack it untilfchmod. Mappings take a regular file's checks and paths (guest_named_shm_windows_mapping). No behavior here has been measured on PS5. Lifecycle, cross-process resize/write, and mode behavior are exercised by Windows tests. See Microsoft's file sharing modes, DeleteFile and mutex objects.