Commit Graph
1495 Commits
Author SHA1 Message Date
Dean ca1331be63 Merge pull request #16270 from NevesHenry/feat/libkernel-prosperoweb-exports
feat(libkernel): export cpuset_getid, rfork_thread and sceKernelRdup
2026-11-07 15:54:54 +13:00
Dean ff9902091c Merge pull request #15219 from EagleBearerYS/fix/libkernel-setaffinity-set-sizes
fix(libkernel): take the console's 8- to 16-byte sets in pthread_setaffinity_np
2026-11-07 14:37:53 +13:00
NevesHenry c3747080fa Merge main into feat/libkernel-prosperoweb-exports 2026-11-06 22:37:45 -03:00
Adrià 30a863d12d Merge pull request #15135 from MarrasFederico/fix/libkernel-stream-send-enotconn
fix(libkernel): fail a send on a never-connected stream socket with ENOTCONN
2026-11-07 01:58:28 +01:00
Dean 4906098701 Merge pull request #14886 from kallmek3nny/feat/libkernel-kevent-signal
feat(libkernel): accept EVFILT_SIGNAL in kevent
2026-11-07 13:50:49 +13:00
Adrià 0e297f1425 Merge pull request #15035 from Gruzzberry/fix/time-set-eperm
fix(libkernel_sys): fail settimeofday and clock_settime with EPERM for a jailed caller
2026-11-07 00:50:58 +01:00
Dean 5c9b4b39fe Merge pull request #15763 from Ragbie/fix/linux-flock-failed-upgrade
fix(libkernel): keep the shared flock of a failed non-blocking upgrade on Linux as FreeBSD does
2026-11-07 11:29:48 +13:00
Dean d85fad483e Merge pull request #3986 from Silverash-i8/fix/per-thread-signal-mask
fix(libkernel): keep the signal mask per thread
2026-11-07 11:23:32 +13:00
Dean Galvin 171d1c1a11 Merge origin/main into pr14886 2026-11-07 11:08:06 +13:00
kenny soloandClaude Opus 5.5 d8afe4c68b feat(libkernel): always fire a socket read knote with NOTE_LOWAT below 1
A socket EVFILT_READ knote whose NOTE_LOWAT mark is below 1 is now always ready and reports the bytes in the receive buffer, 0 when it is empty, because FreeBSD 11.4 filt_soread returns kn_data >= kn_sdata and the bytes available are never negative. This holds for level-triggered and EV_CLEAR knotes and when EV_ADD changes the mark of an existing knote. A listening socket ignores the mark, as filt_solisten does. An EVFILT_WRITE mark below 1 still throws.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-11-06 21:48:24 +01:00
Dean c168e146f6 Merge pull request #16081 from Opensource55/fix/socketpair-close-semantics
fix(libkernel): answer EPIPE and ECONNRESET after a socketpair peer closes
2026-11-07 09:24:09 +13:00
Dean a1063a98ca Merge pull request #11219 from orezraey/fix/libkernel-ioctl-empty-request-measured-ps5
fix(libkernel): reject empty ioctl requests and answer INET socket requests as measured on a PS5
2026-11-07 09:24:04 +13:00
Dean Galvin 5c82bfc2de Merge branch 'main' 2026-11-07 08:33:00 +13:00
Dean Galvin 27dda5dc2f Merge branch 'main' into pr-14886
Keep both EVFILT_PROC (main) and EVFILT_SIGNAL (this PR) in Kqueue.cpp: the constants, the two knote functions, the filter check and the dispatch. Debt doc: main's EVFILT_PROC and pipe wording with the PR's signal text.
2026-11-07 08:07:09 +13:00
orezraeyandClaude Opus 5.5 36814cbbe0 Merge main into fix/libkernel-ioctl-empty-request-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 14:59:00 -03:00
Adrià 1da78eb048 Merge pull request #14324 from DeveshB-1/fix/openpsid-efault
fix(libkernel): return EFAULT from sceKernelGetOpenPsId for invalid memory
2026-11-06 18:41:40 +01:00
Adrià 9fb6149d12 Merge pull request #14325 from DeveshB-1/fix/prospero-sw-version-efault
fix(libkernel): return EFAULT from sceKernelGetProsperoSystemSwVersion for an unwritable store
2026-11-06 18:18:19 +01:00
GruzzberryandClaude Sonnet 5.5 a7dee2017e fix(libkernel_sys): fail settimeofday and clock_settime with EPERM for a jailed caller
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-06 17:05:56 +00:00
Adrià 399e7fb57e Merge pull request #14111 from slopgobblercobbler/fix/libkernel-posix-cond-null-validation
fix(libkernel): validate null pointers in pthread cond functions
2026-11-06 16:49:34 +01:00
Opensource55 9859dada50 fix(libkernel): answer EPIPE and ECONNRESET after a socketpair peer closes
On Windows a pair is a loopback stream or two connected datagram sockets
rather than the console's local pair. After the peer closes, the first
stream send reaches a socket the host still accepts and succeeds, where
the console fails it with EPIPE, and an empty datagram receive waits on a
socket the host never signals, where the console fails it with
ECONNRESET; a datagram queued before the close is still delivered first.
Both answers now come from the pair's lost peer before the host is
waited on. Measured on a PS5 (13.60 and 11.60): send EPIPE (32) and
receive ECONNRESET (54).

The receive side asks the socket whether a datagram is queued rather than
whether bytes are queued, because a datagram sent with no payload still
has to be delivered: ioctlsocket answers 1 for one on this host, and
select answers readable, while a byte count of the socket as a whole
would answer 0 on a host that counts payload only. The Windows case now
sends an empty datagram before the close and expects it, then 54.
2026-11-06 23:28:36 +08:00
LeandroLP23andClaude Opus 5.5 02c6971e02 docs(debt): correct stale and contradictory entries
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 15:58:52 +01:00
Dean 5b5786fae2 Merge pull request #14854 from kallmek3nny/feat/libkernel-kevent-proc-exit-self
feat(libkernel): accept EVFILT_PROC with NOTE_EXIT on the calling process
2026-11-06 23:03:13 +13:00
Dean 9ee97cb451 Merge pull request #15064 from JJenkx/fix/dmem-size-from-flexible
feat(libkernel): optionally report direct memory as the game budget less the configured flexible memory
2026-11-06 22:16:01 +13:00
Dean Galvin 1de3c88c5c Merge branch 'main' 2026-11-06 21:59:04 +13:00
Dean Galvinandslopgobblercobbler 51ca3cbef0 docs(libkernel): point the barrier count check at _pthread_barrier_init
The FreeBSD permalink in the pthread_barrier debt entry covered _pthread_barrier_destroy; the count check it describes is at lines 97 to 104.

Co-authored-by: slopgobblercobbler <[email protected]>
2026-11-06 19:09:29 +13:00
slopgobblercobbler 405310c630 fix(libkernel): validate memory pointers and argument bounds in pthread barrier 2026-11-06 05:55:51 +01:00
NevesHenryandClaude Opus 5.5 8406fa672c feat(libkernel): export cpuset_getid, rfork_thread and sceKernelRdup
ProsperoWeb (PRWB00001) 0.2.1 imports the three from libkernel. Only
libkernel_sys exported them, and a Linux run of the title does not load
libkernel_sys.prx, so the loader stopped with "undefined symbol:
LxIacrWiJ3w" before the title started.

Cpuset.cpp moves to libkernel whole, because cpuset and cpuset_setid
share its set table with cpuset_getid; its test and debt entry follow.
rfork_thread and sceKernelRdup move with the prototypes the title uses
and still throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 23:25:29 -03:00
Dean Galvin 4492567a14 Merge branch 'main' 2026-11-06 13:07:38 +13:00
Dean b077c1b3a0 Merge pull request #15890 from Retr0G28/fix/ioctl-scenet-socket
fix(libkernel): pass ioctl on a sceNetSocket socket to libSceNet
2026-11-06 12:17:31 +13:00
Abdulrahman Elkordy 694b2b4704 fix(libkernel): keep the signal mask per thread
The blocked mask of sigprocmask, _sigprocmask, pthread_sigmask and
sigsuspend was one process-wide set, so a thread changing its mask changed
every thread's, and scePthreadCreate did not hand the creating thread's mask
to the new thread. Each guest thread now has its own blocked mask and handler
holds, and a new thread starts with its creator's mask. The pending set stays
the process-wide one, so a signal that raise leaves pending is still taken by
sigwait and sigtimedwait on any thread and delivered by the first thread that
unblocks it. A SIGALRM expiry checks the mask of the thread that armed the
timer.

Fixes #2879.

Claude-Session: https://claude.ai/code/session_012SLQbhAiexxW6TtjYToW8a
2026-11-05 15:08:08 +00:00
Evrim Cicek 11f2ffcc40 fix(libkernel): end a blocked receive on Windows when its socket is shut for reading 2026-11-05 17:48:43 +03:00
Dean f305293bb0 Merge pull request #15698 from javierUDP/fix/macos-exec-path-after-stack-move
fix(libkernel): keep the process start block mapped when the main stack moves
2026-11-06 01:29:35 +13:00
orezraeyandClaude Opus 5.5 2e5675adfa Merge main into fix/libkernel-ioctl-empty-request-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 09:23:22 -03:00
Dean fc147beeaa Merge pull request #15149 from 011010/fix/macos-activity-real-runtime
fix(tests): run the macOS game-mode activity against the real runtime
2026-11-05 21:47:04 +13:00
Dean 1e24993fa3 Merge pull request #11223 from Ragbie/fix/poll-after-shut-rd
fix(libkernel): report a socket shut for reading in poll and select and wake their waiters
2026-11-05 17:28:28 +13:00
Dean 051d531d1b Merge pull request #14493 from AlexWhitehouse/fix/libkernel-windows-sparse-truncate
fix(libkernel): leave Windows truncate extensions as sparse holes
2026-11-05 17:27:50 +13:00
Dean 56d300218d Merge pull request #14320 from DeveshB-1/fix/notification-request-efault
fix(libkernel): return EFAULT from sceKernelSendNotificationRequest for invalid memory
2026-11-05 16:59:38 +13:00
Adrià 0540ef0ef2 Merge pull request #13995 from xXPBSXx/docs/libkernel-virtualquery-size
docs(libkernel): name what the emulators do for the size and flags of sceKernelVirtualQuery
2026-11-05 03:15:11 +01:00
Dean a82a382fa8 Merge pull request #13336 from malekaifa/fix/sync-on-address-unreadable
fix(libkernel): return EFAULT for unreadable wait addresses
2026-11-05 12:42:55 +13:00
Retr0 69470e7075 fix(libkernel): pass ioctl on a sceNetSocket socket to libSceNet 2026-11-05 00:11:22 +02:00
Dean 9e70d97449 Merge pull request #13953 from pushkarreddyy/fix/ksem-getvalue-efault
fix(libkernel): return EFAULT from ksem_getvalue for invalid memory pointers
2026-11-05 08:19:49 +13:00
Dean 045eda43dc Merge pull request #12854 from slopgobblercobbler/fix/libkernel-mincore-error-parity
fix(libkernel): enforce FreeBSD 11.4 error precedence and vector copyout in mincore
2026-11-05 08:19:30 +13:00
Dean 5e2f04007b Merge pull request #9326 from erickerxhalli/feat/libkernel-mutex-prioceiling
feat(libkernel): implement pthread_mutex_getprioceiling and setprioceiling
2026-11-05 08:19:17 +13:00
Dean df721d53f2 Merge pull request #7192 from Jev1337/feat/libkernel-host-fault-exception-handlers
feat(libkernel): deliver host faults to sceKernelInstallExceptionHandler handlers
2026-11-05 08:19:08 +13:00
pushkarreddyy ad7b2988b5 docs(libkernel): document EFAULT memory validation fallback in ksem_getvalue 2026-11-04 23:13:27 +05:30
Dean 92cdaf6337 Merge pull request #11624 from Felipebmaitan/feat/windows-guest-gs-state
feat(libkernel): maintain per-thread guest GS bases on Windows
2026-11-05 06:35:52 +13:00
Dean 6863f295a9 Merge pull request #10749 from ycbuzi/refactor/siginterrupt-libc-internal
refactor(libSceLibcInternal): serve siginterrupt from libSceLibcInternal
2026-11-05 06:35:30 +13:00
Evrim Cicek 77d24a44c9 docs(debt): record how flock keeps a shared lock after a failed upgrade on Linux 2026-11-04 16:13:33 +03:00
javierUDP dd5ee9e4c6 fix(libkernel): keep the process start block mapped when the main stack moves
On macOS under Rosetta, Aps5StartGuest moves the main thread off the host
stack and releases the old range to the guest arena. dyld keeps its own
pointers into the process start block at the top of that range and offers
no call that redirects them, where argv and environ have one:
_NSGetExecutablePath copies the path string out of the block on every
call, so the first call after the move read unmapped memory and the
process died with KERN_PROTECTION_FAILURE. A title does not have to call
it: libxpc reaches it from xpc_connection_resume, and ShaderCacheDirectory
calls it for the shader disk cache.

Release the old stack only up to the pages that hold the block, and only
while argv still points into the stack. They are the top two pages, 8 KiB
of the 8372224-byte stack here, so a title that fixes a mapping over that
range now fails with a host region overlap; the rest is free as before.

guest_main_stack_move asked for a 64 KiB guest mapping aligned down from
a local of main, which falls inside the kept pages. It now probes the
64 KiB below them, requires the kept pages to be refused, and calls
_NSGetExecutablePath after the move, which segfaults without this change.
2026-11-04 04:22:23 -03:00
Cesar MoraandClaude Opus 5.5 cd4549d0cc fix(libs): ship mimalloc's licence and document the inherited preload
The release archives carry mimalloc's binaries on Linux and Windows, so
they now also carry its MIT licence as libs/licenses/mimalloc.txt, and
packaging fails without it. USAGE.md and ENVIRONMENT.md say that
APS5_MIMALLOC and LD_PRELOAD stay set after the restart and state the
memory cost measured with it, and the restart's debt entry says that
only the log-file copy is handed back before execv.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015W3M6NbYpmwWkzkL8YNLaF
2026-11-03 23:18:32 -06:00