fix(libkernel_sys): answer every pathconf name as the console's UFS mount does #10196
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10196"
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 orezraey on 2026-10-23T12:58:38Z.
What
pathconfmeasured on a retail PS5 (firmware 13.60) throughlibkernel_sys.sprx's ownpathconffrom a payload process, over every name from 0 to 70 on 22 paths. The sources and console logs are in this gist (ppathconf2,ppathconf3).The answer depends on the mount. The console has at least five sets:
/dataand/user;/,/system,/hostapp,/preinstand/update; tmpfs (/system_tmp,/mnt/sandbox,/mnt/usb0); devfs (/dev/null); and UFS (/system_data).AnyPS5 already answered with FreeBSD's UFS constants, and those match
/system_datafor every name it answered. It threw for the rest; they now return what/system_datareturns:_PC_ALLOC_SIZE_MIN,_PC_REC_INCR_XFER_SIZE,_PC_REC_MIN_XFER_SIZEand_PC_MIN_HOLE_SIZE: 65536;_PC_REC_XFER_ALIGN: 16384;_PC_ACL_PATH_MAX: 3;_PC_ACL_EXTENDED,_PC_MAC_PRESENTand_PC_ACL_NFS4: 0;_PC_MAX_CANON,_PC_MAX_INPUT,_PC_VDISABLEand_PC_ASYNC_IO:EINVAL.The lookup errors already matched:
EFAULTfor a null path,ENOENTfor an empty or missing one,ENOTDIRunder a file, andENAMETOOLONGfor 1024 bytes or a component over 255.Not followed:
/app0,/savedata0,/temp0and/download0do not exist in a payload process, so what a title sees there is unknown. The debt entry lists how the other mounts differ.Tested
main(f26434afa3, with #10706):88bf509e20. The test takes its declarations from the library headers and drops the unusedPathconfThrows.guest_kernel_syspasses three runs in a row on Windows (MinGW) and on Linux (WSL Ubuntu, GCC);public_headersaudit andcheck_conventionspass.Windows 11, MinGW (winlibs).
guest_kernel_syschecks every newly answered name for a file and a directory throughpathconf,fpathconfand_fpathconf, andEINVALfor the four names above (_PC_ASYNC_IOstays 200112 for the descriptor forms). It throws onmainand passes three runs in a row with the change.tools/check_conventions.pypasses.PathConfigurationValue.fpathconfand_fpathconfon a file or directory answer them too, since FreeBSD 11'skern_fpathconfasks the sameVOP_PATHCONF; pipes and_PC_ASYNC_IOkeep #10060's handling.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)fpathconf's return), #10427, #9442, #9713; #9442, #9713 edit the same lines too (merge order only); #10706 edits the same lines too (merge order only); lands before #11032, which changesPathConfigurationValuetoo (Gruzzberry agreed to refresh it)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T13:01:04Z.
Review: DISMISSED
Reviewed exact head
9fc8d159bdecb858e6a72741b0822fd7b58d1171. The measured/system_datavalues are narrowly applied to names that were previously unimplemented, while the existing lookup-error behavior remains covered; the added test cases exercise file and directory paths, and hosted eligibility/conventions/labels/report checks pass. One contribution-rule item remains unresolved: the PR itself says #10060 moves the samepathconfswitch intoPathConfigurationValueand that the second branch must carry the first branch’s values, but the checklist still saysDepends on: noneand the body records no agreement with #10060’s author. Please coordinate the landing order with that author and update the dependency line accordingly, preserving both sets of behavior whichever lands second. I am not asking either author to close work; this is only the required overlap sequencing.