Commit Graph
564 Commits
Author SHA1 Message Date
harisibrar1andClaude Opus 5.5 c7cd45c0da fix(libkernel): return EINTR from pselect when its mask unblocks a pending signal
FreeBSD's kern_pselect installs the mask and kern_select sleeps with
PCATCH, so a pending signal that the new mask unblocks makes the call
return EINTR once the descriptors have been scanned. Here the handler ran
inside the mask swap and select then waited the full timeout, or forever
with no timeout. The swap now reports whether a handler ran, and pselect
then scans the descriptors once without waiting: a ready descriptor, a
zero timeout or an invalid argument keep select's answer, and otherwise
the call fails with EINTR and leaves the descriptor sets unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 00:39:02 -04:00
Dean 83a25ceb71 Merge pull request #9105 from Retr0G28/fix/connect-port0-connected-dgram
fix(libkernel): disconnect a connected datagram socket on connect to port 0
2026-10-24 16:54:25 +13:00
Dean 68871895d4 Merge pull request #9256 from Dom3005/fix/windows-fcntl-append
fix(libkernel): change O_APPEND on a Windows file through fcntl
2026-10-24 16:37:06 +13:00
Dean 379b1dca32 Merge pull request #9164 from MaxLikesCode/fix/kernel-sema-einval
fix(libkernel): return EINVAL for the semaphore arguments the console rejects
2026-10-24 15:28:17 +13:00
Dean 43d6937041 Merge pull request #10246 from orezraey/fix/libkernel-pthread-create-detach-measured-ps5
fix(libkernel): refuse long thread names and answer a detach after a join as measured on a PS5
2026-10-24 15:26:04 +13:00
Dean 6fc058f5cf Merge pull request #10302 from orezraey/fix/libkernel-socket-buffers-measured-ps5
fix(libkernel): keep socket buffer sizes and SO_NBIO as measured on a PS5
2026-10-24 15:25:05 +13:00
Dom3005andClaude Opus 5.5 dd6220698a fix(libkernel): change O_APPEND on a Windows file through fcntl
fcntl(F_SETFL) threw when it changed O_APPEND on a Windows file. The
guest flag already chooses WriteAtEnd, but a descriptor opened with
O_APPEND also carries the CRT's append flag, so _write kept appending
after the guest cleared it. F_SETFL now replaces the CRT descriptor of
every descriptor sharing the open file's status with a duplicate handle
opened with or without _O_APPEND, as libc fdopen does for append mode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:28:14 +02:00
Dean d8b73e3644 Merge pull request #9273 from DavidSamir/feat/libkernel-sys-pselect
feat(libkernel): implement pselect over select
2026-10-24 12:53:12 +13:00
MaxandClaude Opus 5.5 3ddaa64707 fix(libkernel): return EINVAL for the semaphore arguments the console rejects
The prosper console oracle measured SCE_KERNEL_ERROR_EINVAL for creating
a semaphore with an initial count above the maximum, a maximum of 0, a
negative initial count or a null name, for polling 0 or more than the
maximum, and for signalling 0. These threw, or polled past the maximum
returned EBUSY, and signalling 0 succeeded.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 01:18:34 +02:00
Dean ca7bf033c5 Merge pull request #9005 from JJenkx/fix/libkernel-sema-null-esrch
fix(libkernel): return ESRCH for a null semaphore handle
2026-10-24 11:58:20 +13:00
Dean 85f2f2d478 Merge pull request #8544 from Retr0G28/fix/fcntl-getfl-pipe-rdwr
fix(libkernel): report O_RDWR from F_GETFL on both ends of a pipe
2026-10-24 11:55:31 +13:00
Dean 313d905437 Merge pull request #9877 from orezraey/fix/libkernel-release-flexible-measured-ps5
fix(libkernel): keep the range sceKernelReleaseFlexibleMemory releases mapped as measured on a PS5
2026-10-24 10:37:09 +13:00
Dean Galvin baa657a24b Merge main into fix/libkernel-sema-null-esrch 2026-10-24 09:17:39 +13:00
Dean 7956a166c7 Merge pull request #9108 from Retr0G28/fix/socket-address-length-exact
fix(libkernel): reject socket addresses longer than sockaddr_in or sockaddr_in6 with EINVAL
2026-10-24 09:12:39 +13:00
Dean fac234a47c Merge pull request #9134 from orezraey/fix/libkernel-event-flag-measured-ps5
feat(libkernel): match event flags to PS5 and add shared flags
2026-10-24 09:12:14 +13:00
Dean Galvin a2ee2958a5 Merge main into fix/fcntl-getfl-pipe-rdwr 2026-10-24 09:07:08 +13:00
Adrià 8cc82c85bf Merge pull request #6469 from QRMOE/fix-low-guest-address-mappings
fix(memory): honor low guest mapping hints
2026-10-23 21:06:11 +02:00
Adrià 606999f3ab Merge pull request #7937 from DavidSamir/feat/libkernel-jit-shared-memory-macos
feat(libkernel): JIT shared memory on macOS hosts
2026-10-23 20:37:27 +02:00
orezraeyandClaude Opus 5.5 d8d03c2839 fix(libkernel): give the host the requested socket buffer and test the inherited sizes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 15:16:09 -03:00
orezraeyandClaude Opus 5.5 f334c156e1 fix(libkernel): keep socket buffer sizes and SO_NBIO as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 13:49:03 -03:00
Hermes Agent a05ea75447 docs(libkernel): clarify unknown sysctl lookup behavior 2026-10-23 12:27:31 -04:00
Hermes Agent 950a21aec8 fix(libkernel): return ENOENT for unknown sysctl names 2026-10-23 12:27:30 -04:00
orezraeyandClaude Opus 5.5 2a05015c2a fix(libkernel): refuse long thread names and answer a detach after a join as measured on a PS5
scePthreadCreate returns ENAMETOOLONG for a name of 32 bytes or more without creating the thread, and scePthreadDetach returns ESRCH for a joined thread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 12:21:46 -03:00
QRMOE 5836873170 fix(memory): honor low guest mapping hints 2026-10-23 16:51:33 +02:00
Dean 4f3087c677 Merge pull request #10136 from orezraey/fix/libkernel-close-standard-descriptors-measured-ps5
fix(libkernel): refuse closing the standard descriptors with EPERM as measured on a PS5
2026-10-24 03:23:15 +13:00
orezraeyandClaude Opus 5.5 83caf5f997 docs(libkernel): say which sceKernelOpenEventFlag null-output answers were measured
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 10:46:40 -03:00
Dean Galvin 6747c5b996 Merge main into fix/fcntl-getfl-pipe-rdwr 2026-10-24 02:10:48 +13:00
Dean 65f1d28e7d Merge pull request #9109 from Retr0G28/fix/alias-trailing-slash-windows
fix(libc): fail with ENOTDIR for a file named with a trailing slash on Windows
2026-10-24 02:08:03 +13:00
Dean 06fd07ab4a Merge pull request #8700 from nikowolf123/feat/libkernel-underscore-socket-signal-entries
feat(libkernel): export the underscore entry points of the socket, directory and signal calls
2026-10-24 00:53:04 +13:00
Dean 74f6fa8e31 Merge pull request #10076 from JJenkx/windows/raise-host-backoff
fix(libkernel): give a raise target time to run between host-code samples
2026-10-24 00:45:09 +13:00
orezraey 5c7cdfda26 Merge remote-tracking branch 'origin/main' into fix/libkernel-close-standard-descriptors-measured-ps5 2026-10-23 06:55:14 -03:00
Dean b3e42bd1eb Merge pull request #8359 from Ragbie/fix/windows-pwrite-append
fix(libkernel): append positioned writes on an O_APPEND descriptor on Windows
2026-10-23 22:23:57 +13:00
Dean Galvin 2f741e737f Merge main into feat/libkernel-underscore-socket-signal-entries 2026-10-23 22:00:32 +13:00
Dean fef15751e6 Merge pull request #8641 from Danigamer05/fix/libkernel-windows-birthtime
fix(libkernel): clamp Windows birth time when setting earlier timestamps
2026-10-23 21:49:21 +13:00
Dean 24331355f7 Merge pull request #9060 from ags-arnab/feat/net-ioctl
feat(libSceNet): implement sceNetIoctl
2026-10-23 21:48:24 +13:00
Dean dd5b2a3869 Merge pull request #9736 from LeandroLP23/feat/libkernel-kern-proc-env
feat(libkernel): answer kern.proc.env for the calling process
2026-10-23 21:47:33 +13:00
Dean 0dd46f1867 Merge pull request #8547 from Retr0G28/fix/connect-einprogress-windows
test(libkernel): require EINPROGRESS from a nonblocking connect in progress
2026-10-23 21:39:18 +13:00
JJenkxandClaude Opus 5.5 fcc01c57a6 fix(libkernel): give a raise target time to run between host-code samples
RaiseOn suspends the target, reads its context and, while it is in host
code, resumes it and samples again after SwitchToThread. On a 16-core
Ryzen 9 5950X (Windows 11 22H2) that resampled the writer of
guest_raise_in_host_code about every 10 us before it could run: in the
raise that hung, 4,989 samples over 50 ms all found it in ucrtbase, so
the 50 ms host-code limit ran out and the handler was redirected into
fwrite, where it deadlocked on the stream lock (the test timed out at
30 s on every run). In a passing raise the samples sat at one RIP for
14,695 of 14,703 samples and the raise took 145 ms.

Spin for 20 us before each new host-code sample, so the target gets to
leave host code. With that, guest_raise_in_host_code passes 5 of 5 runs,
no raise is redirected in host code, and the longest raise is 0.46 to
0.53 ms. Other samples keep SwitchToThread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 04:32:33 -04:00
Dean f075f91737 Merge pull request #9314 from DavidSamir/feat/libkernel-sys-ktimer
feat(libkernel): implement SIGEV_NONE POSIX timers
2026-10-23 20:34:29 +13:00
Dean c31f139db4 Merge pull request #8890 from UnhealthyKraken/feat/libkernel-pthread-timedjoin
feat(libkernel): implement pthread_timedjoin_np
2026-10-23 20:05:52 +13:00
Dean c9edaff579 Merge pull request #9104 from Retr0G28/fix/sendfile-enotsock
fix(libkernel): return ENOTSOCK from sendfile on a descriptor that is not a socket
2026-10-23 19:25:35 +13:00
Retr0 0f3d4bc9ee fix(libc): fail with ENOTDIR for a file named with a trailing slash on Windows
FreeBSD 11.4's lookup() (sys/kern/vfs_lookup.c) fails with ENOTDIR when
a path with a trailing slash ends at something that is not a directory.
On Windows a mount alias dropped the slash, and the host calls do not
report ENOTDIR for "file\", so unlink, rename and open acted on the file
or failed with EINVAL. Guest path resolution now rejects an existing
non-directory named with a trailing slash with ENOTDIR on every host, and
a mount alias keeps the slash on Windows as it does on Linux and macOS.
2026-10-23 08:21:01 +03:00
Arnab Ghosh 5dfa258d9f feat(libSceNet): implement sceNetIoctl 2026-10-23 10:07:18 +06:00
Dean 9a030c2d50 Merge pull request #8537 from elieh999/fix/setrlimit-nproc
fix(libkernel): store the process resource limit
2026-10-23 16:44:35 +13:00
Dean ee8a7349b5 Merge pull request #9265 from HQasper/claude/project-thread-6o4na3
feat(libkernel): implement pthread_rwlock_reltimedrdlock_np and pthread_rwlock_reltimedwrlock_np
2026-10-23 16:05:37 +13:00
Dean Galvin 2f45a312d0 Merge main into fix/setrlimit-nproc 2026-10-23 15:50:49 +13:00
Dean 00439857cb Merge pull request #9840 from Dom3005/fix/fstatfs-character-device
fix(libkernel): answer fstatfs on a character device as devfs does
2026-10-23 15:33:35 +13:00
orezraey 216014c846 Merge remote-tracking branch 'origin/main' into fix/libkernel-close-standard-descriptors-measured-ps5 2026-10-22 22:51:28 -03:00
Dean 39e971a2ea Merge pull request #8985 from MarcZX10/codex/groups-pointer-safety
fix(libkernel): return EFAULT for invalid group pointers
2026-10-23 14:05:39 +13:00
orezraeyandClaude Opus 5.5 791990ad3e fix(libkernel): check the event flag name before the output as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 21:37:07 -03:00