Repository navigation
Conversation
… thread scePthreadCondSignalto and pthread_cond_signalto_np answered EPERM for a handle that is not a live thread, where a PS5 on firmware 13.60 returns ESRCH. The check sits between the null-thread and not-waiting checks, as that console orders them.
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
12 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
scePthreadCondSignaltoandpthread_cond_signalto_npreturnedEPERMfor a handle that is not a thread. A PS5 returnsESRCHthere. @orezraey measured it in a payload process on firmware 13.60 (probe and log, from #11263):scePthreadCondSignaltopthread_cond_signalto_npmainbefore0x800200160x123450x800200030x80020001/ 10x80020001The debt entry already recorded the difference. The new check sits between the null check and the not-waiting check, as the console orders them. It uses
GuestThreadIsLive, the lookuppthread_getprio,sched_setparamandpthread_setaffinity_npalready use to answerESRCH. It compares the handle with the registered threads without dereferencing it. A thread that has finished but hasn't been joined wasn't tried on the console; like those calls, it now getsESRCHhere, and the debt entry says so. No function changes count.GuestCondTimedwait.cpp'sSignalTo()adds the0x12345case for both exports. Its existing checks still requireEPERMfor the calling thread, which isn't waiting.Overlap: #13725 also changes
Cond.cppand the debt line above, in other places;git merge-treemerges the two cleanly.Tested
Windows 11 (WinLibs MinGW-w64 GCC 15.2.0 UCRT r7, CMake 4.3.1, Ninja 1.13.2) and Ubuntu 24.04 on WSL2 (GCC 13.3.0, CMake 3.28.3, Ninja 1.11.1), both with the head 0a5c3be merged into
maine8c25dd.Cond.cpporGuestCondTimedwait.cpp.ctest -R "cond|pthread" -E "^agc_|^secondary_output": 69 of 69 pass on both hosts, covering theguest_cond_*,guest_pthread_*,guest_kernel_sys_pthread*andguest_ult_condition_*tests.guest_cond_timedwaitpasses 3 of 3 on--repeat until-fail:3. The existing checks that the calling thread getsEPERMstill pass.mainwith only the test change,guest_cond_timedwaitbuilds and then aborts at the first0x12345check (line 153), wheremainreturnsEPERM(Windows exit 0xc0000409, Linux SIGABRT).tools/check_conventions.pypasses.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)