Repository navigation
feat(libkernel): open /dev/random and /dev/urandom for reading - #1777
Merged
adriadam10 merged 2 commits intoOct 10, 2026
Merged
Conversation
This was referenced Oct 8, 2026
9 tasks done
8 of 9 tasks
This was referenced Oct 9, 2026
9 tasks done
9 tasks done
This was referenced Oct 9, 2026
Collaborator
|
This conflicts with main after today's merges; could you rebase? It passed testing and is otherwise ready. |
Neither existed under the guest root, so opening them failed and titles that then read from the descriptor crashed. Opening either for reading now returns a descriptor whose reads, positioned reads and vector reads fill the buffer from the host's random device, as sceRandomGetRandomNumber does. Opening them for writing throws. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Collaborator
|
Rebased onto current main (conflicts were only include/source-list adjacency); build and the affected tests pass on Linux (400/400). Also added one commit: a "Functional" line in Merging once CI is green on the new head. |
adriadam10
force-pushed
the
feat/libkernel-random-device
branch
from
October 10, 2026 07:19
4e48131 to
b49ffef
Compare
SleglJan
pushed a commit
to SleglJan/AnyPS5
that referenced
this pull request
Oct 10, 2026
…el-random-device feat(libkernel): open /dev/random and /dev/urandom for reading
9 tasks done
11 tasks done
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
/dev/randomand/dev/urandomresolved to files under the guest root that do not exist, soopenfailed. Titles that read entropy from them then read from the failed descriptor: Planet Coaster (PPSA01736) aborts insceKernelReadwithfd=-1, errno=9.Opening either path for reading now returns a descriptor backed by the host's null device.
read,pread,readvandpreadvon it fill the buffer fromstd::random_device, the sourcesceRandomGetRandomNumberalready uses. As on FreeBSD, both devices behave the same and positioned reads ignore the offset. Opening them for writing (adding entropy) throws. Closing a descriptor, throughcloseorsceKernelClose, forgets it.Tested
Windows 11, MinGW-w64 15.2.0.
guest_filesystemopens both paths and checksread.guest_file_vectorchecksreadv,preadvandpreadon/dev/urandom. The full ctest suite passes (476/476), andtools/check_conventions.py --base origin/mainpasses. With this change, Planet Coaster (PPSA01736) no longer aborts reading/dev/urandomat startup. Linux: built and run only through the shared code; the Linux-onlypread,readvandpreadvbranches are not run on Linux.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository