Repository navigation
Conversation
|
@xdCloudy Thanks for the firmware work: the The two take different routes: #9161 turns the Windows |
471c5f5 to
496f97a
Compare
|
@oneandonlydean Thanks, you were right about the |
rooklz
left a comment
There was a problem hiding this comment.
Reviewed at 806b7bd, host-side only. I did no console runs and have no firmware access.
Duplicate export. The checklist says no other open PR implements the same function, but #9161 (yabanana, last updated today, head d2f98f3, MERGEABLE) implements statfs with the same (const char*, KernelStatfs*) signature. A local python3 tools/pr_overlap.py --branch on this head reports it:
| Pull request | Conflicting files (lines on main) |
Same exports |
|---|---|---|
| #9161 | core/libs/prx/libkernel_sys/Export.Discovery.cpp L2146-2150 |
statfs |
git merge-tree against 3a2b919 is clean for this PR on its own, but it conflicts with #9161 in that hunk. Whichever merges second has to be rebased or dropped. This is the same situation as #12687, where futimesat/symlinkat were also in #9161.
#9161's statfs test covers more than this PR's 10 rows:
- errno stays unchanged on success
- canary words around the output show it is written exactly
sizeof(KernelStatfs)wide - the output is left untouched on ENOENT
- an unreadable path pointer (
1) gives EFAULT - an output buffer that straddles a read-only page gives EFAULT
Every row here already has an equivalent in #9161; the only difference is that this PR uses 0x10 as the bad output pointer where #9161 uses 1. Archive-only paths throw in both PRs: here through ResolvePath's "reading" refusal, in #9161 through an explicit "statfs" refusal. So I'd suggest folding anything unique into #9161 instead of landing a second statfs.
The POSIX branch was never run. Per the body, the Linux run stopped before the new rows, and the PR's linux CI lane was skipped. I took NativeStatfsPath verbatim, along with main's NativeFstatfs, DeviceFilesystem, SceErrorFromErrno, the GUEST_* constants and NotFoundError_nid_no_patch. I built it with -fsanitize=address,undefined on Ubuntu 24.04 x86_64 (glibc 2.39, ext4/overlay tmp, non-root). Result: 0 mismatches and no sanitizer reports.
| Path | Result |
|---|---|
| file / directory | 0, and the record matches _fstatfs on the same file byte for byte up to f_owner |
| missing | 2 |
file/child |
20 |
| dangling symlink | 2 |
| 2-link symlink loop | 62 |
| 256-char component | 63 |
| named FIFO | 0 |
| bound AF_UNIX socket path | 0 |
/dev/null |
0, giving DeviceFilesystem 512/2/255 |
| component without search permission | 13 |
So the Linux path is correct as written. These results should also hold for #9161's equivalent NativeStatfs if it keeps the same stat→statvfs order. Unlike _fstatfs, a FIFO or socket path returns 0 instead of EINVAL. That is consistent with FreeBSD resolving the vnode's mount, but it is worth one debt sentence in whichever PR lands.
Conventions pass at this head.
|
@rooklz Thanks for the independent Linux validation and the FIFO/socket path note. I removed |
|
@adriadam10 we won't merge this while it duplicates #9161; if it turns out to add something #9161 lacks, we'll merge it once the requests above are addressed and exact-head CI is green, unless you'd rather handle it yourself. |
What
Implements
getfsstat(EARPL-r8jf0) for the AnyPS5 guest mount model. Firmware 13.60 Ghidra analysis oflibkernel_sys.sprx(SHA-25660921322b155ba649cfa29ea5e6d358ca0229424b4f73fd5c30ae7f7ce7c304c) identifies the wrapper at0x1a70invoking syscall 395. The implementation follows the FreeBSD 11.4 buffer-size, mode, count-query and bounded-copy contract; it reports the guest root and registered guest path aliases and fills eachf_mntonnamewith the guest path. Filesystem statistics use the shared host-backed path-statistics provider introduced by #9161, so this PR depends on #9161. The enumerated mounts and host-specific fields do not reproduce the PS5 mount table; limitations are recorded indocs/dev/debt/libkernel_sys.md.Tested
guest_kernel_sys_tests; focusedguest_kernel_sysCTest passed (1/1).guest_kernel_sys_tests; focused test executable passed when launched from/tmp.git diff --checkpassed.Checklist
main; no other open PR implements the same functionNotImplemented_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)