feat(libkernel): support kern.rng_pseudo in sysctlbyname #3218
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3218"
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 babyhuey on 2026-10-11T01:53:06Z.
What
sysctlbynameanswerskern.rng_pseudoby filling the caller's whole buffer with bytes from the host'sstd::random_device, leaving the length as passed. A write returns -1 withEPERM, like the other names, and a call without an output buffer throws, since what the console reports for a size query is unknown. TechnicalDebt (Unknown function info) records that the console's generator and per-call maximum are unknown.The caller is mbedTLS's
mbedtls_hardware_pollin the catalog's ProsperoLight boilerplate (platform/ps5/ps5_entropy.c), which asks for 64-byte blocks and fails if fewer come back. Four catalog eboots contain the name: Steam Remote Play (PPSA99350), ProsperoLight (PPSA99002), ProsperoLichess (PPSA99009) and OpenNOW (PPSA99082). The last three stop earlier onmain(_umtx_op, #1482, andpthread_set_name_np, #3031).Steam Remote Play stops here on
mainb6f649d9(catalog build,eboot.binandsce_module/libc.prxunwrapped as #2605 requires; tracked in #1578):terminate called after throwing an instance of 'std::runtime_error'withwhat(): sysctlbyname_nid_postfix: unsupported name kern.rng_pseudo, right after it opensidentity.bin[libc] unhandled exception 'St13runtime_error',unsupported name kern.rng_pseudo)state: LOOKING FOR A PC RUNNING STEAM, then stops at window creation because the Docker run has no Vulkan surfaceTested
Linux (Ubuntu 24.04, GCC 13) and Windows 11 (MinGW-w64 GCC 15.2 from WinLibs), Release:
guest_system_configurationpasses 5/5 (--repeat until-fail:5). The new cases read two 64-byte blocks and check the length and that they differ, thaterrnois untouched, that a write fails withEPERM, and that a call without a buffer throws.check_conventions.pypasses.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 (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T05:05:48Z.
Please rebase this onto
mainwithout #2902. That one is waiting on a decision about the version value, and this change doesn't need it; the two only touch the same place insysctlbyname.Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-11T05:35:03Z.
Rebased onto
mainf5c0fe00without #2902 (c66d38c5, one commit).guest_system_configurationpasses 5/5 on Linux, and Steam Remote Play still gets toLOOKING FOR A PC RUNNING STEAMwithoutkern.sdk_version, so it never asks for that name. I updated the description.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T07:55:11Z.
Rebased onto current
main(conflicts with the newsceKernelGetSystemSwVersioncheck and its TechnicalDebt line; kept both sides, no logic change). Build and libkernel/libs ctest pass on Linux, includingguest_system_configuration; the new cases fail without the change. Merging once CI is green.