fix(libkernel_sys): fail link, symlink, pathconf and fchmodat through a regular file with ENOTDIR #8522
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8522"
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 xXPBSXx on 2026-10-20T14:51:23Z.
What
link,symlink,pathconfandfchmodatansweredENOENTfor a path whose directory part is a regular file, such asfile/child; FreeBSD 11.4 answersENOTDIR(vfs_cache_lookup, sys/kern/vfs_cache.c:2104-2105), as the open, stat, unlink, chmod, truncate, utimes, rename, chdir, remove and opendir changes before this one already do. The not-found branches of the four calls now askHasNonDirectoryPrefixfirst: the source and the destination parent oflink, the parent ofsymlink, the status error and not-found branch ofpathconf, and thechmodfailure offchmodat.readlinkandreadlinkatare left to #8312.Fixes #8521
Follow-up to #8195, #8199 and #8200 (merged).
git merge-treeagainstupstream/main, #8312, #5528, #6942 and #8217 is clean;pr_overlapwas not run.Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release, on upstream/main
75787d2f64+ this commit:guest_kernel_sys: fails at the new cases (guest errno 2) withlibkernel_sys/Export.cpptaken back to main, passes with the change (3 of 3 runs). New cases:pathconf,fchmodat,symlinkand bothlinkforms throughfile.txt/childreturn -1 with errno 20.guest_filesystem,guest_path_name_length,guest_truncate_extend,guest_poll,guest_select,guest_select_wait,guest_kqueue.python tools/check_conventions.py --base upstream/main: passes.fchmodatbranch for them changes the same way but is not built here), a console, a title run.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryAI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T15:00:38Z.
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_sys/Export.cppL306-335Some 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_sys/Export.cppcore/libs/prx/libkernel_sys/Export.cppcore/libs/tests/GuestKernelSys.cppcore/libs/tests/GuestKernelSys.cppcore/libs/prx/libkernel_sys/Export.cppImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-21T18:48:10Z.
Checked the four not-found branches (
pathconf,linksource and destination parent,symlinkparent,fchmodatchmod failure) against the existingHasNonDirectoryPrefixuses in the same file; the success paths are unchanged, and the newGuestKernelSyscases return 20 where main returned 2; merged.