libkernel: implement shm_unlink (PPSA99010 vkQuake); branch and PR #3250 ready #3251

Closed
opened 2026-10-11 03:29:22 +00:00 by pushkarreddyy · 3 comments
pushkarreddyy commented 2026-10-11 03:29:22 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-11T03:29:22Z.


Problem & Runtime Context

Titles using POSIX shared memory (such as PPSA99010 vkQuake and homebrew runtime ports) rely on shm_open paired with shm_unlink (tPWsbOUGO8k). While shm_open was added for anonymous objects, shm_unlink is missing from libkernel.

Ready Fix & Branch

A clean, self-contained fix conforming 100% to repository conventions (0 comments, atomic commit, unit tests in GuestShmOpen, TechnicalDebt entry) is implemented and ready:

Implementation Details

  • Follows FreeBSD 11.4 sys_shm_unlink error handling:
    • Null path returns -1 and sets *__error_nid_postfix() = 14 (EFAULT).
    • Anonymous descriptor path == anonymousObject (SHM_ANON) returns -1 and sets *__error_nid_postfix() = 22 (EINVAL).
    • Empty path *path == '\0' returns -1 and sets *__error_nid_postfix() = 2 (ENOENT).
    • Named objects throw NotImplemented_nid_no_patch("shm_unlink of a named object") matching shm_open.
  • Extended GuestShmOpen.cpp test suite covering nullptr, anonymousObject, empty string, and named object throws.
  • Updated docs/dev/TechnicalDebt.md.
  • Passed python tools/check_conventions.py --base origin/main with 0 errors.

Opening this tracking issue while PR #3250 is intake-paused so maintainers can review, carry, or cherry-pick into an active merge train.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5797609340 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3251). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-11T03:29:22Z. --- ### Problem & Runtime Context Titles using POSIX shared memory (such as `PPSA99010` vkQuake and homebrew runtime ports) rely on `shm_open` paired with `shm_unlink` (`tPWsbOUGO8k`). While `shm_open` was added for anonymous objects, `shm_unlink` is missing from `libkernel`. ### Ready Fix & Branch A clean, self-contained fix conforming 100% to repository conventions (0 comments, atomic commit, unit tests in `GuestShmOpen`, TechnicalDebt entry) is implemented and ready: - Branch: [`pushkarreddyy:feat/libkernel-shm-unlink`](https://github.com/pushkarreddyy/AnyPS5/tree/feat/libkernel-shm-unlink) - Commit: `31c3d91dc` - PR: #3250 ### Implementation Details - Follows FreeBSD 11.4 `sys_shm_unlink` error handling: - Null `path` returns -1 and sets `*__error_nid_postfix() = 14` (`EFAULT`). - Anonymous descriptor `path == anonymousObject` (`SHM_ANON`) returns -1 and sets `*__error_nid_postfix() = 22` (`EINVAL`). - Empty path `*path == '\0'` returns -1 and sets `*__error_nid_postfix() = 2` (`ENOENT`). - Named objects throw `NotImplemented_nid_no_patch("shm_unlink of a named object")` matching `shm_open`. - Extended `GuestShmOpen.cpp` test suite covering `nullptr`, `anonymousObject`, empty string, and named object throws. - Updated `docs/dev/TechnicalDebt.md`. - Passed `python tools/check_conventions.py --base origin/main` with 0 errors. Opening this tracking issue while PR #3250 is intake-paused so maintainers can review, carry, or cherry-pick into an active merge train.
pushkarreddyy commented 2026-10-11 03:43:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-11T03:43:47Z.


cc @MarcZX100 @adriadam10: Branch pushkarreddyy:feat/libkernel-shm-unlink (31c3d91dc) on PR #3250 is verified and ready for review/carry.

  • Follows FreeBSD 11.4 sys_shm_unlink error codes (EFAULT 14 on null, EINVAL 22 on SHM_ANON, ENOENT 2 on empty string) and throws on named objects matching shm_open.
  • Passed check_conventions.py with 0 errors and extended GuestShmOpen unit tests passing.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6105128138 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3251#issuecomment-6105128138). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-11T03:43:47Z. --- cc @MarcZX100 @adriadam10: Branch [`pushkarreddyy:feat/libkernel-shm-unlink`](https://github.com/pushkarreddyy/AnyPS5/tree/feat/libkernel-shm-unlink) (`31c3d91dc`) on PR #3250 is verified and ready for review/carry. - Follows FreeBSD 11.4 `sys_shm_unlink` error codes (`EFAULT` 14 on null, `EINVAL` 22 on `SHM_ANON`, `ENOENT` 2 on empty string) and throws on named objects matching `shm_open`. - Passed `check_conventions.py` with 0 errors and extended `GuestShmOpen` unit tests passing.
orishamir commented 2026-10-11 08:42:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by orishamir on 2026-10-11T08:42:29Z.


The catalog build of vkQuake (PPSA99010 v1.0, PPSA99010.zip, sha256 aeabf175... as in the catalog record) does not import shm_unlink: after unwrapping eboot.bin from its fake-SELF container, the NID tPWsbOUGO8k appears nowhere among the 335 NID#lib#module symbol strings of the executable or in the bundled libc.prx, and the relink registry lists no such import. Its absent imports on main ccf9ff90 (tools/import_audit.py, names from tools/nid_names.py):

  • 0hlfW1O4Aa4 localeconv (#3249)
  • 04AjkP0jO9U _umtx_op (#1482)
  • oLjPqUKhzes pthread_attr_getinheritsched, e2G+cdEkOmU pthread_attr_getscope, xesmlSI-KCI pthread_attr_setscope (#3165)
  • DxmIMUQ-wXY pthread_attr_getstackaddr (#1912, closed on Oct 9 until a title stops there)
    It does import shm_open (QuJYZ2KVGGQ), which the audit lists among its five throwing stubs with execvp, fork, select and sceSystemServiceLoadExec.

The zip also carries no game data (eboot.bin, sce_sys, sce_module, manifest.sha256 only), so even past the imports it would need Quake's .pak files to get anywhere. A title that actually imports tPWsbOUGO8k is needed as the evidence for this one.

AI-assisted: yes (Claude Code Fable 5.1 xhigh)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6107237486 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3251#issuecomment-6107237486). Originally posted by [orishamir](https://github.com/orishamir) on 2026-10-11T08:42:29Z. --- The catalog build of vkQuake (PPSA99010 v1.0, `PPSA99010.zip`, sha256 `aeabf175...` as in the catalog record) does not import `shm_unlink`: after unwrapping `eboot.bin` from its fake-SELF container, the NID `tPWsbOUGO8k` appears nowhere among the 335 `NID#lib#module` symbol strings of the executable or in the bundled `libc.prx`, and the relink registry lists no such import. Its absent imports on `main` ccf9ff90 (`tools/import_audit.py`, names from `tools/nid_names.py`): - `0hlfW1O4Aa4` `localeconv` (#3249) - `04AjkP0jO9U` `_umtx_op` (#1482) - `oLjPqUKhzes` `pthread_attr_getinheritsched`, `e2G+cdEkOmU` `pthread_attr_getscope`, `xesmlSI-KCI` `pthread_attr_setscope` (#3165) - `DxmIMUQ-wXY` `pthread_attr_getstackaddr` (#1912, closed on Oct 9 until a title stops there) It does import `shm_open` (`QuJYZ2KVGGQ`), which the audit lists among its five throwing stubs with `execvp`, `fork`, `select` and `sceSystemServiceLoadExec`. The zip also carries no game data (`eboot.bin`, `sce_sys`, `sce_module`, `manifest.sha256` only), so even past the imports it would need Quake's `.pak` files to get anywhere. A title that actually imports `tPWsbOUGO8k` is needed as the evidence for this one. AI-assisted: yes (Claude Code Fable 5.1 xhigh)
oneandonlydean commented 2026-10-12 06:17:08 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T06:17:08Z.


Closing: shm_unlink is on main since #3555 (File/src/SharedMemory.cpp:472). It is implemented on Linux, and on Windows a named object throws as shm_open does. Reopen with the title and the log line if a run stops in it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6118857436 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3251#issuecomment-6118857436). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-12T06:17:08Z. --- Closing: `shm_unlink` is on main since #3555 (`File/src/SharedMemory.cpp:472`). It is implemented on Linux, and on Windows a named object throws as `shm_open` does. Reopen with the title and the log line if a run stops in it.
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#3251
No description provided.