feat(libkernel): implement sceKernelGetFsSandboxRandomWord #1807
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1807"
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 SleglJan on 2026-10-08T19:54:29Z.
What
Adds
sceKernelGetFsSandboxRandomWordto libkernel, in a newSystem/src/Sandbox.cpp. On the console a title's sandbox root holdsapp0and a directory with a random-looking name under which system files are exposed; the function returns that name, and the open-source SDKs splice it into paths:/<name>/common/cert/CA_LIST.cer(ProsperoEden),/<name>/common/lib/libc.sprx(tiny-ps4-shell),/<name>/common/lib/mscorlib.dll(ps4-hen-plugins). The kernel keeps the name per process andrandomized_path(syscall 602) reads it back, as obliteration implements it, with/system/common/libmounted at<name>/common/lib.gkbHtXc3Wq, so a path built from it is the same across runs. It is recorded in TechnicalDebt: nothing is mounted under the name here, so/gkbHtXc3Wq/common/...resolves under the guest root like any other path and does not exist.Of the 34 relinked titles in the homebrew catalog (#1578), 12 import the function and 5 stop at it on
mainb858fdc4: each dies in the loader withapp.elf: symbol lookup error: app.elf: undefined symbol: JGfTMBOdUJo. They are PPSA17641 SymphonyStation5, PPSA74126 Stremio Plus, PPSA97510 PSXS5, PPSA99009 ProsperoLichess and PPSA99082 OpenNOW PS5 - Prototype, which makes it the most common next stop in the catalog. With this change each of them reaches its next missing import:sceVideoOutGetResolutionStatus(#1714),socketpair(#1711),geteuid(#1650),geteuid(#1650) andsysctlbyname(#1685).Overlap: none by
tools/pr_overlap.pyagainst the open pull requests. #1748, #1650 and #1675 changeSystem/src/Process.cpp, which this does not touch; the source line goes afterProcess.cppinlibkernel/CMakeLists.txt, the test block afterguest_file_vector, and the TechnicalDebt entry after thesceKernelPreadone, clear of #1802's rewrite of thesceKernelRaiseExceptionentries.Tested
BUILD_TESTING=ONandANYPS5_ENABLE_SPIRV_TOOLS=ONon this branch (based onmainb858fdc4):ctest --repeat until-fail:3487/487;tools/check_test_registration.pyandtools/check_conventions.py --base upstream/mainpass.guest_sandbox_random_wordtest: a non-null, non-empty alphanumeric name, the same pointer on a second call and from another thread, andopenof/<name>/common/lib/libc.sprxfailing withENOENT. Written before the implementation; it failed on the unresolved export and passes with it.libkernel.prxexports the NID (JGfTMBOdUJo).mainb858fdc4and run for 8 s each in a bubblewrap sandbox (Linux, RTX 3080): every one stops in the host loader onundefined symbol: JGfTMBOdUJo; with this branch'slibkernel.prxthe same runs stop on the next import listed above.tools/import_audit.pyon four of the 12 catalog titles, absent imports onmainb858fdc4→ this branch: PPSA17641 SymphonyStation5 35 → 34, PPSA97510 PSXS5 72 → 71, PPSA99009 ProsperoLichess 37 → 36, PPSA99082 OpenNOW PS5 - Prototype 36 → 35; the one that disappears is this function each time. No title was run, since each still has other absent imports, listed in #1578.mainb858fdc4), run 37833619159:guest_sandbox_random_wordpasses its three repeats, full suite 478/478 on Windows and 487/487 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 (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T05:32:42Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/TechnicalDebt.mdL252core/libs/prx/libkernel/CMakeLists.txtL483Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T08:31:50Z.
Progress report (
4b6ab6b→7785933)➖ System libraries: 84.76% (+0.0%, +1 implemented functions)
✅ 1 implemented
sceKernelGetFsSandboxRandomWordImported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T10:04:04Z.
First Windows run, since the description says it wasn't tested on Windows.
Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Merged onto
mainb7218b3ctogether with nine other small libc/libkernel PRs: #1975, #1976, #1977, #1859, #1685, #1676, #1675, #1641, #1656.guest_sandbox_random_wordpasses.🤖 Addressed by Claude Code
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T21:52:38Z.
Checked: build + full ctest (524/524) on top of current
main,guest_sandbox_random_wordpasses and the build fails without the change; CI green on the head; no overlap with open PRs. The fixed name is unverified on a console and is recorded inTechnicalDebt.md(shadPS4 also returns a fixed string). Windows run by @popcoder565 confirms the test there. Merging.