feat(libkernel_sys): implement is_in_sandbox #10421
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10421"
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 amazedturnip on 2026-10-23T23:49:20Z.
What
Implement
is_in_sandbox_nid_postfixreturning 1 inlibkernel_sysand document the behavior in technical debt.On PS5 and FreeBSD 11 runtime environments, user-space guest application processes execute inside a sandboxed container jail. Titles query
is_in_sandbox()to confirm isolation, expecting 1.Tested
guest_kernel_sys_ktimer_testscleanly withRequire(is_in_sandbox_nid_postfix() == 1).python3 tools/check_conventions.py --base upstream/main(passed).python3 tools/pr_overlap.py --branch feat/libkernel_sys-is-in-sandbox(0 conflicting files, 0 overlap).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 repositoryImported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-24T01:04:28Z.
Review: COMMENTED
Checked against main
11d6efa06c, shadPS4 bab374ba8e (src/core/libraries/kernel/process.cpp) and ps5-payload-dev/sdk a7685ce8e9 (sce_stubs/libkernel_sys.c):return 1matches shadPS4, whosesceKernelIsInSandboxreturns 1 for a title process (process.cpp:15-17). The sdk only has a label stub foris_in_sandbox, soint(void)looks right.sceKernelIsInSandboxin the same library is stillNotImplemented_nid_no_patchon main (Export.Discovery.cpp:1494). After this PR, a title that asks through the raw call gets 1, while thescewrapper throws. Could it return the same value in this PR, or callis_in_sandbox_nid_postfix?Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T22:03:13Z.
Review: APPROVED
Re-reviewed exact head
aae9b2456a8232ed57b98a6ab15d4aa69cfa654c.The follow-up addressed the consistency point: both
is_in_sandbox_nid_postfix()andsceKernelIsInSandbox()now return the same value through one implementation, the stale throwing definitions are removed, the focused guest test asserts both exports, and the debt entry cites its behavioral reference. The current-main merge-tree is clean; current-main conventions and diff-check pass. The author reports the focused guest kernel test passing; hosted product builds are not run for this PR, and I did not run the test binary locally.No blocking findings on this head.