Commit Graph
3154 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 61d8e62433 Merge pull request #15127 from milescoviello/test/pthread-yield-same-cpu
test(libkernel): cover scePthreadYield letting a thread on the same CPU run
2026-11-06 22:15:57 +13:00
Dean Galvin 1de3c88c5c Merge branch 'main' 2026-11-06 21:59:04 +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
Dean ab9c66406f Merge pull request #14846 from JJenkx/windows/libkernel-poll-socket-close
fix(libkernel): notice a socket closed during poll or select
2026-11-06 12:16:30 +13:00
Dean fca1a701b3 Merge pull request #16073 from Ragbie/fix/blocking-receive-shut-rd
fix(libkernel): end a blocked receive on Windows when its socket is shut for reading
2026-11-06 09:52:31 +13:00
Dean 151a2cb6e2 Merge pull request #16075 from evanrk/fix/libkernel-sync-on-address-min-macos
fix(libkernel): compare a wait address's range end as uintptr_t on macOS
2026-11-06 08:57:43 +13:00
Dean eb14e8daf5 Merge pull request #16082 from oneandonlydean/fix/sandbox-cert-list-no-throw
fix(libkernel): never throw from the sandbox certificate list
2026-11-06 07:40:08 +13:00
Dean Galvin 7361a14382 fix(libkernel): remove the temporary certificate file after a failed rename
The temporary file is made read-only before the rename. When the rename
fails, Windows refuses to remove a read-only file, so the temporary copy
stayed in the cache directory. Give the owner write permission back
before removing it. The failure test now clears its cache directory,
including read-only files, before and after it runs, so it can run
again in the same directory.
2026-11-06 06:37:09 +13:00
Opensource55 dfc217b316 fix(libc): reopen a standard stream onto a directory on Windows
A guest that reopens `stdin`, `stdout` or `stderr` onto a directory in a read mode threw instead of
returning the stream, while the console answers that a directory opens in a read mode and the
debt entry already recorded the throw as the Windows difference.

The standard stream now goes through the same descriptor move a regular file uses: the directory
descriptor is opened, moved onto the standard descriptor, and libkernel's directory entry follows
it, so `fstat` of the guest descriptor reports a directory and the first read answers `EISDIR` with
the error indicator set, like every other directory stream. A failed open restores the previous
standard target.

`guest_freopen_host_standard` reopens `stdout` onto a directory, asserts `S_IFDIR` on the guest
descriptor, asserts the first read answers `EISDIR`, then reopens the same stream on a file path
and writes through it.
2026-11-06 01:09:06 +08:00
Dean Galvin 7974523c92 Merge branch 'main' 2026-11-06 04:40:14 +13:00
Dean Galvin bb225c2257 fix(libkernel): never throw from the sandbox certificate list
Writing and reading the cached CA_LIST.cer used the throwing filesystem
and stream calls. Tests that share the cache directory raced on the
rename over the cached file, and on Windows the resulting
filesystem_error cannot be delivered through libkernel frames, so the
test process died. Use the error_code overloads, read in chunks that
set the stream error state, treat a lost rename race as success when the
cached file already holds the bundle, and answer an unavailable list
with no file instead of caching the failure.

The new test blocks the cache directory and the cached file in turn and
expects the open to fail with ENOENT, then to succeed once unblocked.
2026-11-06 04:30:33 +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
Evan KleinandClaude Opus 5.5 302d5a32fc fix(libkernel): compare a wait address's range end as uintptr_t on macOS
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 09:55:32 -05: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 Galvin e627498b24 Merge branch 'main' 2026-11-06 00:51:30 +13:00
Dean 9c267bcb55 Merge pull request #12646 from slopgobblercobbler/fix/libkernel-socket-ioctl-efault
fix(libkernel): return EFAULT from socket ioctl for invalid memory pointers
2026-11-06 00:05:12 +13:00
Dean 2ad4212034 Merge pull request #12139 from dantdmdarealguy/fix/getdents-removed-entries-windows
fix(libkernel): leave out directory entries removed while getdents lists them on Windows
2026-11-06 00:04:44 +13:00
Dean f4b501eb20 Merge pull request #11894 from xXPBSXx/test/posix-cond-broadcast
test(libkernel): cover pthread_cond_broadcast
2026-11-06 00:04:35 +13:00
Dean 946bde70ed Merge pull request #11579 from plexerPK/codex/nanosleep-guest-request
fix(libkernel): copy nanosleep requests before reading guest fields
2026-11-06 00:04:17 +13:00
Dean 26e8ed784a Merge pull request #12915 from Kikoarl/fix/libkernel-fstatat-bounds
fix(libkernel): validate guest FileStat destination in fstatat when follow is false
2026-11-05 21:51:07 +13:00
Dean 2238042b81 Merge pull request #15705 from oneandonlydean/rr/pr3-gpu
feat(run-report): count milestones, frames, GPU and shader diagnostics
2026-11-05 21:24:14 +13:00
Dean 1fe3ee8d1a Merge pull request #14235 from oneandonlydean/rr/pr2-writer
feat(run-report): write the run report when a game ends
2026-11-05 21:24:09 +13:00