fix(libkernel): accept semaphore attribute bits 0x100 to 0x102 #13600

Merged
akkadbakkad89 merged 2 commits from upstream-pr/13600 into main 2026-10-31 09:17:34 +00:00
akkadbakkad89 commented 2026-10-30 19:03:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-30T19:03:22Z.


What

sceKernelCreateSema accepted attribute bits 0x100 to 0x102 on a PS5 (firmware 13.60 payload run) but threw NotImplemented here. The bits are now accepted and ignored — their effect is unmeasured — and recorded under Silent stubs in the libkernel debt file. isFifo reads the ordering field (attr & 3) so 0x101 keeps the FIFO ordering its low bits select.

Tested

guest_semaphore and guest_semaphore_trace on Windows 11 (MinGW build): the EINVAL loop's 0x100-0x102 skip now asserts SCE_OK for each bit and sceKernelDeleteSema releases each created semaphore. Both tests pass.

Call sites checked in the three audited titles' relinked executables: PPSA20397 reaches sceKernelCreateSema from five sites passing attr 0, 0, 1, 1, 1 (0x141b54a83, 0x14301359b, 0x143c48136, 0x143feb25e, 0x144d6d97d in app.exe); PPSA03530 from five sites all passing attr 1; PPSA30528 lists the import but no call site. No title call passes 0x1xx, so nothing is unblocked by the attribute itself — the change matches the measured console answer only.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none (text-adjacent edits to Semaphore.cpp exist in #9491 and #10558; whichever lands second rebases)
  • Fixes: none
  • Unblocks: none (all three audited titles import sceKernelCreateSema, but no call site passes bits 0x100 to 0x102)
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5089640099 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13600). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-10-30T19:03:22Z. --- ### What `sceKernelCreateSema` accepted attribute bits 0x100 to 0x102 on a PS5 (firmware 13.60 payload run) but threw `NotImplemented` here. The bits are now accepted and ignored — their effect is unmeasured — and recorded under Silent stubs in the libkernel debt file. `isFifo` reads the ordering field (`attr & 3`) so 0x101 keeps the FIFO ordering its low bits select. ### Tested `guest_semaphore` and `guest_semaphore_trace` on Windows 11 (MinGW build): the EINVAL loop's 0x100-0x102 skip now asserts `SCE_OK` for each bit and `sceKernelDeleteSema` releases each created semaphore. Both tests pass. Call sites checked in the three audited titles' relinked executables: PPSA20397 reaches `sceKernelCreateSema` from five sites passing attr 0, 0, 1, 1, 1 (0x141b54a83, 0x14301359b, 0x143c48136, 0x143feb25e, 0x144d6d97d in app.exe); PPSA03530 from five sites all passing attr 1; PPSA30528 lists the import but no call site. No title call passes 0x1xx, so nothing is unblocked by the attribute itself — the change matches the measured console answer only. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none (text-adjacent edits to `Semaphore.cpp` exist in #9491 and #10558; whichever lands second rebases) - [x] Fixes: none - [x] Unblocks: none (all three audited titles import `sceKernelCreateSema`, but no call site passes bits 0x100 to 0x102) - [x] GPUs tested: n/a - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
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!13600
No description provided.