fix(libkernel): reject empty filesystem paths #3465
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3465"
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 MarcZX10 on 2026-10-11T11:00:52Z.
What
Reject empty pathnames in the remaining kernel filesystem calls that otherwise resolve an empty string to the guest working directory.
sceKernelStat,sceKernelUnlink,sceKernelCheckReachability,sceKernelRename,sceKernelRmdir,sceKernelChmod,sceKernelTruncateandsceKernelUtimesnow returnENOENT. Add regression coverage for each operation. This follows the separatesceKernelOpenfix in #3428 and addresses the follow-up noted in #3308.Tested
guest_filesystem_tests.ctest --test-dir build-followup --output-on-failure --repeat until-fail:3 -R '^guest_filesystem$' --no-tests=errorpassed three runs.sceKernelStat("")assertion against currentmainwithout this patch.python3 tools/check_conventions.py --base upstream/mainpassed;git diff --checkpassed.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 repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T11:44:12Z.
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)core/libs/prx/libkernel/File/src/Open.cppL251-252core/libs/prx/libkernel/File/src/Stdio.cppL698-699, L1001-1002, L1014-1015, L1038-1039Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T11:50:54Z.
Checked on Linux:
guest_filesystempasses with the change and fails with the non-test changes reverted. The empty-path checks match FreeBSDnamei(sys/kern/vfs_lookup.c, empty pathnames are refused with ENOENT), and the test covers every call touched. No overlap with other open PRs; merging once CI is green.