- ps5-std-rt: faccessat over access, readlinkat over readlink, for
AT_FDCWD or absolute paths; relative to another dir fd stays ENOSYS.
AT_EACCESS tries eaccess (also ENOSYS on the PS5) and only falls back
to access when real and effective ids match; payloads run as uid 1 /
euid 0, so it stays ENOSYS there instead of answering for the wrong user.
- build.rs: faccessat and readlinkat left out of the generated stubs.
- err_probe: success and error cases for both, uid/gid info, symlink
test reported as info when the filesystem has none.
Tested on CFI-1215A, fw 13.60: 0 FAIL. Found: uid 1 euid 0; /data
has no symlinks (EOPNOTSUPP); access and readlink exist, eaccess doesn't.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SDK libc.a's syscalls.o stubs (mov $N,%rax; syscall; ret) never check
the carry flag, so a failing call returns the errno value as a result:
openat "returned" fd 2 for ENOENT, unlinkat "succeeded". std linked dup,
openat and unlinkat from there.
- ps5-std-rt/build.rs: disassembles the installed SDK's syscalls.o and
generates all 232 stubs (fstatat excluded, it's ours) with the same
numbers plus `jb __ps5_cerror` (errno + -1); any stub with another
shape stops the build. Drops syscalls.o from the patched libc copy,
which no longer needs the fstatat rename.
- std-examples/err_probe: provokes failures (bad fds, missing paths,
refused connect, port in use) via libc and std, port 9960.
Tested on CFI-1215A, fw 13.60: all errors reported as -1 + errno; the
SDK-style stub returns 2. faccessat/readlinkat give ENOSYS from the PS5
kernel itself. fs_probe and https_probe unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>