fix(libkernel): return EFAULT from truncate, utimes, mkdir, rmdir, and rename for a null path #7114
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7114"
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 pushkarreddyy on 2026-10-17T12:10:00Z.
What
Following @oneandonlydean's review directive in #7114:
Folds #7110 (
sceKernelTruncate,sceKernelUtimes), #7113 (sceKernelMkdir,sceKernelRmdir), and #7114 (sceKernelRename) together into this single PR, building cleanly on top of companion PR #7108 (sceKernelStat,sceKernelUnlink).Like FreeBSD 11 (
kern/vfs_syscalls.c), null path pointers reject early withEFAULT(0x8002000e) instead of throwing unhandled exceptions at runtime.Closes #7110.
Closes #7113.
Tested
python tools/check_conventions.py --base origin/mainpasses with 0 findings.core/libs/tests/GuestPosixScalarIo.cppunit tests cover null path rejection for all 5 functions returning0x8002000e.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 repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T12:17:28Z.
Thanks @pushkarreddyy, this looks right too:
GUEST_EFAULTis already defined, and the throw becomes an error. But #7108, #7110, #7113 and this one all add lines at the same spots inGuestPosixScalarIo.cpp, so every pair of them conflicts. To keep it simple: #7108 merges first, then one PR that folds #7110, #7113 and #7114 together, rebased on main after #7108. You can close the other two once the combined one is up (or reuse one of them). We'll run CI once on that head.Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-17T12:21:59Z.
Thanks @oneandonlydean! Acknowledged — I have this folded together with #7110 and #7113 on a clean branch rebased on latest main, and will close this once #7108 merges.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T12:42:46Z.
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/Stdio.cppL1273-1291Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libkernel/File/src/Stdio.cppcore/libs/tests/GuestPosixScalarIo.cppcore/libs/prx/libkernel/File/src/Stdio.cppcore/libs/prx/libkernel/File/src/Stdio.cppImported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-17T14:06:25Z.
Hi @oneandonlydean,
Done! Following your directive:
Ready for single CI run whenever convenient!