On a standard-port handle the console answers NOT_PERMITTED (0x80920101):
Halo CE Universal's pad probe measured it on firmware 13.59 for two
connected DualSenses in three runs. The function returned 0 with
invented controller information instead. The special port keeps its
zeroed answer.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The libc.prx that PPSA31872 ships returns ERANGE for a buffer shorter than
23 bytes and otherwise strncpy's length - 1 bytes and terminates the last
one. This matches the firmware 13.60 log, where error 0 with a 16-byte
buffer returned 34 although "No error" fits.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Prospero Win measured on firmware 12.02 that the PS5 kernel accepts
MAP_EXCL but ignores it: MAP_FIXED | MAP_EXCL over an existing mapping
replaces it without error. Fixed anonymous mmap now does the same instead
of FreeBSD's ENOMEM. MAP_EXCL without MAP_FIXED stays EINVAL.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The nine-slot _ZTVSt7collateIcE export added by #9979 was still zeroed, so a guest that called through the exported vtable faulted. Fill slots 2 through 8 with the same facet methods that g_collateVtable uses, leave the offset-to-top and typeinfo slots zero, and cover compare, transform, hash, retain and release through the exported object.
The debt entry said that shrink-wrapped leaves, which push later and pop in
balance, could be framed. They cannot as the framer works now: lowering RSP on
entry moves their later pushes onto the spills, which keep their addresses.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Match the AT_REMOVEDIR and rmdir sites so file reparse points stay on the old unlink path. Cover file symlink unlinkat on Windows and point the debt at the drive-target consumers.
rmdir followed the junction and reported ENOTEMPTY, and unlink treated it as a real directory, so a junction to a non-empty folder could not be removed.
Main's #9573 implements scePthreadResume right after the
scePthreadMutexattrSetkind stub this branch removes from libkernel_sys;
the merge takes main's scePthreadResume and leaves the stub out.
Main's public-header audit wants one header declaration per export, so
the merge declares this branch's scePthreadMutexattrSetkind,
scePthreadMutexattrGetkind and pthread_rwlockattr_settype_np in
libkernel's Api.hpp, drops their stub declarations from libkernel_sys's
Api.hpp, has Mutex.cpp take sceKernelError from libkernel's Api.hpp,
and has the test include the libkernel headers instead of its own
declarations.
The firmware disassembly (the real Sony libScePsml.sprx inside PPSA20397)
shows scePsmlMfsrInit returning 0x8A810012 before touching the initialized
flag when sceKernelIsTrinityMode is 0, so on the modelled console every MFSR
call correctly stays uninitialized instead of reaching the unimplemented
dispatch path. The shared-resources pair likewise returns 0x8A81000D for
disallowed types and 0x8A810015 while a shared-resources object already
exists.
Two stream send behaviours of XNU differ from FreeBSD and Linux:
- MSG_DONTWAIT does not keep a stream send on a blocking socket from
waiting for buffer space; XNU only skips the wait for the send buffer
lock. A 16 MiB send to a slow peer blocked until the peer went away.
A MSG_DONTWAIT transfer now also passes XNU's MSG_NBIO (0x20000), which
makes one call non-blocking: the send queues what fits and returns that
count, or EAGAIN when nothing fits.
- A blocking stream send that fails after queuing data, for example when
sceNetSocketAbort shuts the socket down, returns only the error, where
Linux returns the bytes queued. A blocking stream send now goes to the
host in sends of 64 KiB and reports the bytes of the sends that
completed when a later one fails, as #8658 does.
The debt entry records the undocumented flag and the bytes that a failing
64 KiB send queued but does not report.
Co-authored-by: iamthehimansh <[email protected]>