fix(libs): harden guest pointer copies and errno in libkernel, Http2, and Ult #20829
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/20829"
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 gurtgg on 2026-11-15T16:16:30Z.
What
Bundle guest-copy,
errno, and atomic-output hardening acrosslibkernel(pthread_mutexattr_get*/scePthreadMutexattrGet*incore/libs/prx/libkernel/Pthread/Posix/Mutex.cpp),libSceHttp2(sceHttp2GetCookieincore/libs/prx/libSceHttp2/Cookies.cpp), andlibSceUlt(sceUltGetReaderWriterLockInfoincore/libs/prx/libSceUlt/src/ReaderWriterLock.cpp), preservingerrnoand avoiding partial outputs on fault, with one regression test per changed export (Random.cppremoved per review).Tested
Not built or executed locally (CMake build toolchain is unavailable on this machine); static convention and diff checks ran against
boykopovar/AnyPS5main, andcore/libs/tests/GuestPthreadMutexPrioceiling.cpp,core/libs/tests/GuestHttp2Cookies.cpp,core/libs/tests/GuestUltQueue.cppwere updated with regression assertions for CI verification.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T16:42:37Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change based on the code reviewed; the runtime updates consistently use checked guest copies and preserve errno on the covered paths.
What I ran
Reviewed head
a0900493a6c45d899b819772c38cc55d486db7b4. No commands or tests were run; the description reports that the change was not built or executed locally.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The changed files in
files/were all read:core/libs/prx/libSceHttp2/Cookies.cpp,core/libs/prx/libSceUlt/src/ReaderWriterLock.cpp,core/libs/prx/libc/src/Random.cpp,core/libs/prx/libkernel/Pthread/Posix/Mutex.cpp, and testscore/libs/tests/GuestHttp2Cookies.cpp,core/libs/tests/GuestPthreadMutexPrioceiling.cpp,core/libs/tests/GuestRandomState.cpp,core/libs/tests/GuestUltQueue.cpp. No changed files were excluded. Build, test execution, and console behavior were not verified.To get this to a good state
Nothing is required.