12 KiB
libScePosixForWebKit technical debt
Unknown function info
-
Resolver host failures remain unverified on PS5. A host
EAI_SYSTEMingetaddrinfoorgetnameinforeturns 11, the FreeBSD 11.4EAI_SYSTEM. A legacygethostbynamefailure retains its resolver error. Systemerrnofollows the existing libc and socket error mappings; unrecognized errors becomeEIO. Host resolver policy and failure causes can differ from the console. -
opendir, closedir, readdir, readdir_r (libScePosixForWebKit) - whether the console implementation of directory enumeration functions in libScePosixForWebKit applies WebKit sandboxing, custom path rewriting, or internal directory filtering is unverified; the exports forward directly to libc directory operations (opendir, closedir, readdir, readdir_r). Names and NIDs (ay3uROQAc5A, XepdqehVYe4, lybyyKtP54c, J0kng1yac3M) appear in the PS5 3.20 export inventory.
-
gethostbyname (libScePosixForWebKit) - numeric IPv4 forms, trailing whitespace and 64-bit accumulation follow FreeBSD 11.4 inet_aton; clearing the resolver error on numeric success follows fakeaddr. Exact PS5 behavior is unverified; hostname lookup still uses the host resolver
-
mmap_np, msetname, pthread_setschedparam_np, setenv_np, sysinfo (
scePosixForWebKit_sysinfo) (libScePosixForWebKit) - names/NIDs appear in the PS5 3.20 export inventory and verified NID name database; credible prototypes are unknown.sysinfouses a renamed helper. All are parameterless import stubs, not ABI claims; callers must not use them until signatures are verified. -
gethostbyname_r (
scePosixForWebKit_gethostbyname_r, NIDdt8ermYp-Wc) - no console or WebKit caller was read. The signature, the__copy_hostentbuffer layout,ERANGEwithNETDB_INTERNALfor a short buffer, and -1 with*h_errnopset and*resultnull for a failed lookup follow FreeBSD 11.4 gethostnamadr.c. Hostnames use the host resolver and IPv4 only, and only numeric names clearh_errno, as ingethostbyname. FreeBSD retries a numeric name that does not fit through/etc/hostsand DNS; this returnsERANGE. Numeric names are cut toMAXDNAME(1025) bytes, also ingethostbyname. A null pointer FreeBSD would dereference throws. Closes when: compared with the console.
Functional
-
mkostemp (NID
QP8dYkB8zCU) - console ABI and behavior are unverified;O_DIRECTreaches libkernel'sopenas FreeBSD 11.4's_gettemppasses it, soF_GETFLreports it but the host file keeps using the page cache. A lock failure guestflockcannot translate throws. Otherwise follows FreeBSD 11.4 mktemp.c and open-time locking: other flag bits returnEINVALbefore the template is read,O_EXLOCKwins overO_SHLOCK, and a lock failure closes the descriptor and leaves the file. A null template throws after flag validation. The sharedmkstemp/mkostemptemplate checks returnEFAULT(14) for unreadable input or an unwritable trailing-Xrange andENOMEM(12) if the checked copy cannot allocate; these are host-safety fallbacks, not console measurements. -
strcasestr (libScePosixForWebKit) - console locale behavior is unmeasured. It follows FreeBSD 11.4's strcasestr.c in the guest's supported C locale; other guest locales are not implemented.
-
mkstemp and isatty (libScePosixForWebKit) follow FreeBSD's temporary-file API and terminal check, without console verification.
mkstempreplaces all trailingXcharacters, accepts a fixed name, and creates files through the guest path resolver with exclusive read/write access and mode 0600. Windows file permissions follow the existing kernel file implementation.isattytests Windows console handles rather than all character devices; files, pipes and guest sockets returnENOTTY, closed descriptors returnEBADF. -
__wrap_fchown, __wrap_link, __wrap_readlink, __wrap_statvfs and __wrap_symlink (libScePosixForWebKit) - whether the console's wrappers add sandbox checks or path rewriting for WebKit is unknown. Each takes the signature of the function it is named after, as GNU ld's
--wrapdoes, and calls it: libkernel_sys'sfchown,link,readlinkandsymlink, and libSceLibcInternal'sstatvfs, with their gaps -
arc4random, arc4random_uniform (libScePosixForWebKit) -
arc4randomreturns four bytes of host OS entropy (getentropy,rand_son Windows), asarc4random_bufdoes, uniform over the 32-bit range like FreeBSD 11.4's RC4 keystream in arc4random.c.arc4random_uniform(upper_bound)returns a uniformly distributed value in[0, upper_bound)via rejection sampling overarc4random, returning0for upper bounds of 0 and 1 without drawing entropy. The console's generator and its reseeding are unknown;arc4random_stirandarc4random_addrandomare not in the module's export set and are absent -
pthread_setname_np (libScePosixForWebKit) stores the guest thread name in libkernel's thread object, so
pthread_getname_npreturns it, and follows libkernel'spthread_rename_np:EINVAL(22) for a null thread or name,ENAMETOOLONG(63) from 32 bytes on,0otherwise, with the name truncated to 31 bytes when read back. It does not apply the Windows thread description or the job affinity thatscePthreadRenamesets, because those helpers are private to libkernel; the console's exact error numbers for this module are unverified -
pthread_setname_np guest name (libScePosixForWebKit) - a non-null unreadable name previously faulted the host. A bounded checked copy now returns
EFAULT(14) for unreadable memory andENOMEM(12) on allocation failure, preserving the prior null-argument and 32-byte length results and leaving the stored name unchanged on failure. These error results are host-safety fallbacks, unmeasured on a console. A non-null invalid thread object is still dereferenced directly. -
fnmatch (libScePosixForWebKit) follows FreeBSD 11 fnmatch.c in the C locale: each byte is one character,
FNM_CASEFOLDfolds ASCII letters only, and bracket ranges compare byte values.[:class:]names are not character classes: as in FreeBSD 11 through 14,[[:digit:]]is the set of[,:,d,i,g,tfollowed by a literal](classes were added tofnmatch.cafter 14). Multibyte characters and locale collation are not modelled. A null pattern or string throws -
getservbyname (libScePosixForWebKit) searches a built-in copy of 37 lines of FreeBSD 11.4's etc/services (ftp-data, ftp, ssh, telnet, smtp, domain, tftp, http, pop3, ntp, imap, https, rtsp, submission, imaps, pop3s with their aliases and protocols, in file order) the way getservent.c searches the file: case-sensitive name or alias, a null protocol takes the first match, the port in network byte order, the result in per-thread storage. The console's
/etc/servicesis unknown, so any other service, including a null name (whose console result is unmeasured), returns null without settingerrno, as for a name the file lacks.getaddrinfostill resolves service names through the host's service database -
__wrap_access, __wrap_clock_gettime, __wrap_getcwd, __wrap_getenv, __wrap_lstat and __wrap_mmap (libScePosixForWebKit) assume, from the export names alone, the GNU ld
--wrapconvention (a reference to<name>resolves to__wrap_<name>): each takes its target's POSIX signature and forwards to libc's (access,getcwd,getenv) or libkernel's (clock_gettime,lstat,mmap) implementation, which setserrno. No PS5 module or WebKit call site was read to confirm that WebKit imports__wrap_<name>in place of<name>or that the console wrappers only forward. Any sandbox or path handling the console module adds is not modelled, and how the wrappers relate togetenv_np,setenv_np,mmap_npandclock_gettime_np(such as a separate environment thatsetenv_npfills) is unknown -
clock_gettime_np and getenv_np (libScePosixForWebKit) - signatures follow WebKit's PlayStation callers, LanguagePlayStation.cpp (
getenv_np(name, buffer, size), 0 is success) and pas_monotonic_time.c (clock_gettime_np(CLOCK_MONOTONIC_FAST, &ts)); not measured on a console.clock_gettime_npforwards to libkernel'sclock_gettime.getenv_npcopies the guest environment's value and returns 0; a missing name returns -1 without writing; a value that does not fit and null pointers throw. Unknown: whether the console reads the environment or a storesetenv_npfills, its error values, and short-buffer behaviour -
getaddrinfo - PS5 execution is unverified; host DNS policy, address ordering, default-hint SCTP records and flags can differ from FreeBSD 11.4 getaddrinfo.c. Its raw entries omit
SOCKTYPE_ANY: unspecified queries resolve eligible TCP/UDP transports with concrete host hints, including null guest hints, and discard unconvertible types; an empty result returnsEAI_FAIL. Explicit raw queries preserve any protocol number, reject a non-null service withEAI_SERVICE, and resolve addresses through the host datagram path with zero ports.