Commit Graph
1004 Commits
Author SHA1 Message Date
orezraeyandClaude Opus 5.5 2d50330245 fix(libkernel): check the socket address length before its family as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 18:19:43 -03:00
Adrià 26ba9b6b71 Merge pull request #9499 from EagleBearerYS/fix/libkernel-signal-handler-mask
fix(libkernel): block a signal while its handler runs and honour SA_RESETHAND
2026-10-25 22:05:12 +01:00
orezraeyandClaude Opus 5.5 0868498fc2 fix(libkernel): make F_DUP2FD_CLOEXEC duplicate without the target as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 18:04:25 -03:00
orezraey ea98a6e5f1 fix(libkernel): fail F_DUPFD_CLOEXEC with EOPNOTSUPP as measured on a PS5 2026-10-25 18:04:25 -03:00
orezraeyandClaude Opus 5.5 32e1371697 fix(libkernel): check the SoC sensor channel before the pointer and set errno as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 17:42:22 -03:00
p3nicillinandClaude Opus 5.5 8df80bdc3f fix(libkernel): ignore MAP_EXCL in fixed anonymous mmap as measured on a PS5
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]>
2026-10-25 20:33:23 +00:00
orezraeyandClaude Opus 5.5 65d87b4ecb fix(libkernel): resolve sysctl top-level names and fail absent top-level MIBs with ENOENT as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 17:22:26 -03:00
Adrià 9dbc017c71 Merge pull request #9512 from EagleBearerYS/fix/libkernel-poll-socket-hup
fix(libkernel): clear POLLOUT from a hung-up socket in poll on Linux
2026-10-25 21:16:45 +01:00
Maz 33f03f45eb fix(libkernel): guard unlinkat junction path with DIRECTORY
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.
2026-10-26 00:02:20 +04:00
Maz de84153592 fix(libkernel): treat Windows junctions in unlinkat like unlink and rmdir
Relative unlinkat skipped the junction path that absolute unlink and rmdir already use.
2026-10-26 00:02:20 +04:00
Maz f6c24fc271 fix(libkernel): remove a Windows directory junction without emptying its target
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.
2026-10-26 00:02:20 +04:00
Yunus Shaikh 3a47ea6ea4 Merge main into feat/libkernel-sys-libthr-names
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.
2026-10-25 12:49:51 -07:00
orezraeyandClaude Opus 5.5 496d29622c Merge main into fix/libkernel-posix-thread-attr-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 16:44:57 -03:00
orezraeyandClaude Opus 5.5 3345e2047d Merge main into fix/libkernel-pthread-attr-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 16:32:10 -03:00
orezraeyandClaude Opus 5.5 49bcd7549e fix(libkernel): report SCM_BINTIME and SCM_TIMESTAMP from recvmsg as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 16:30:34 -03:00
Adrià aeff26bd97 Merge pull request #9573 from zaryabzip/feat/pthread-create-suspended
feat(libkernel_sys): create threads suspended and resume them
2026-10-25 20:21:07 +01:00
Adrià e1ef22e888 Merge pull request #9461 from milescoviello/fix/tsc-calibration-one-cpu
fix(libkernel): measure the TSC frequency on one CPU
2026-10-25 19:48:55 +01:00
orezraeyandClaude Opus 5.5 f0a989a508 docs(libkernel): record the version stubs, kern.boottime and the SoC power block as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 15:29:10 -03:00
orezraeyandClaude Opus 5.5 fc938dcedb fix(libkernel): throw on PRIO_PGRP and PRIO_USER setpriority until measured
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 15:27:28 -03:00
Yunus Shaikh d0c945ce86 docs(libkernel): record how poll reports a hung-up stream socket on each host 2026-10-25 19:01:11 +01:00
orezraeyandClaude Opus 5.5 642f6fc7ef docs(libkernel): mark PRIO_PGRP and PRIO_USER setpriority as unverified
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 14:59:05 -03:00
orezraeyandClaude Opus 5.5 2a0604d3e9 fix(libkernel): keep the nice value at 0 after setpriority as measured on a PS5
On PS5 firmware 13.60 setpriority(PRIO_PROCESS, 0, v) returns 0 for -25,
-5, 5 and 25, and getpriority keeps returning 0. setpriority keeps its
target checks and returns 0 without storing the value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 14:48:57 -03:00
Adrià 7e4f6e0440 Merge pull request #9482 from valenciana-nc/fix/pthread-attr-ended-thread
fix(libkernel): reject ended threads in pthread_attr_get_np
2026-10-25 18:14:22 +01:00
orezraeyandClaude Opus 5.5 83780cc1a0 Merge main into fix/libkernel-sw-version-block-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 14:11:20 -03:00
Adrià f55190f7e3 Merge pull request #9477 from EagleBearerYS/fix/libkernel-udp-unreachable-port
fix(libkernel): stop Winsock failing an unconnected datagram receive after an unreachable port
2026-10-25 18:04:34 +01:00
Adrià 08f2d02a56 Merge pull request #9171 from DavidSamir/feat/libkernel-sys-getlogin-futimesat
feat(libkernel): implement getlogin
2026-10-25 17:54:15 +01:00
zaryabzip 0b60e97834 feat(libkernel_sys): create threads suspended and resume them
Implement pthread_attr_setcreatesuspend_np, pthread_resume_np,
pthread_resume_all_np and pthread_multi_np with the sce forms
scePthreadAttrSetcreatesuspend, scePthreadResume, scePthreadResumeAll
and scePthreadMulti, following FreeBSD 11.4 libthr and the firmware
13.42 libkernel_sys module. A thread created suspended waits before its
start routine, outside any cancellation point, until it is resumed.
sceKernelRaiseException throws on Windows for a thread still suspended
at creation.
2026-10-25 21:51:02 +05:00
Yunus Shaikh f5757aab98 fix(libkernel): restore a handler's signal bit when the handler replaces the mask
A handler that read the mask and put it back with SIG_SETMASK stored its
own signal, which sigprocmask reports from the hold, in the process mask
and cleared the hold, so the signal stayed blocked after the handler
returned. pselect, setcontext and a siglongjmp inside the handler replace
the mask the same way. When the handler's own thread releases a hold, the
signal now gets back its bit from before the handler when the handler
returns, as FreeBSD's sigreturn puts back the mask from before it. A mask
another thread sets meanwhile is kept.
2026-10-25 09:49:35 -07:00
Adrià c661d9fae2 Merge pull request #9133 from fogydes/feat/libSceLibcInternal-posix-spawn
feat(libSceLibcInternal): implement posix_spawn process creation and reaping
2026-10-25 17:38:41 +01:00
Dean Galvin cfd525426c Merge branch 'main' into pr9187 2026-10-26 05:32:47 +13:00
alnsx 7eecb44157 chore: merge main after socket debt corrections 2026-10-25 12:23:32 -04:00
David a81fcbfacd feat(libkernel): sync each write on a file whose O_FSYNC flag is set
FreeBSD's F_SETFL may change O_FSYNC (FCNTLFLAGS), and vn_write then
writes with IO_SYNC. The flag now lives in the status table, and the
write entry points sync a regular file after the write while it is set.
2026-10-25 17:13:01 +01:00
pushkarreddyy 9839162494 docs(libkernel): clarify sysctl default assumptions for sysKernel queries 2026-10-25 21:19:57 +05:30
Dean 6b46a5dfdb Merge pull request #10299 from orezraey/fix/libkernel-socket-address-measured-ps5
fix(libkernel): check socket address families and lengths as measured on a PS5
2026-10-26 04:45:05 +13:00
pushkarreddyy 2ba10cd6bb refactor(libkernel): align sysKernel queries with firmware 13.42 disassembly 2026-10-25 21:07:36 +05:30
Emanueleandmugurc 30cc4ea2e6 feat(libkernel): start the guest off the main thread on macOS
AppKit, which SDL uses for windows, Metal surfaces, event pumping and game
controllers, works only on the main thread, and a guest never hands its
thread back. The macOS relinker emits a call to Aps5StartGuest as the
entry of a relinked executable; no library provided it.

- Aps5StartGuest runs the guest entry on a new thread with the stack size
  of the main thread (at least 8 MiB) and serves the main dispatch queue
  from the run loop of the main thread. The guest ends the process with
  exit; a guest entry that returns aborts.
- Aps5RunOnMainThread runs a function on the main thread and waits for it,
  or in place where the main thread is the caller or Aps5StartGuest was
  never called.
- libSceVideoOut sends its SDL calls through OnMainThread, which carries
  the exceptions back to the caller: the initialisation and shutdown of the
  video and game controller subsystems, the window, its Vulkan surface and
  drawable size, the event polling and the pad, mouse and keyboard input,
  which are created and destroyed there. On the other platforms the
  functions run in place.
- The flip test starts its tests through Aps5StartGuest on macOS, as a
  relinked guest does.

Co-authored-by: mugurc <[email protected]>
2026-10-25 16:02:42 +01:00
valenciana-nc 37ba4a9d2f fix(libkernel): reject ended threads in pthread_attr_get_np 2026-10-25 15:49:57 +01:00
harisibrar1andClaude Opus 5.5 aebd8881d4 fix(libkernel): fail a write to a pipe without a reader with EPIPE on Windows
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 10:27:58 -04:00
orezraeyandClaude Opus 5.5 2d339842eb fix(libkernel): add 0x80020000 to any event fflags in sceKernelGetEventError as measured on a PS5
On PS5 firmware 13.60 sceKernelGetEventError returns 0x80020000 plus the
event's fflags in 32 bits for every non-zero fflags, including values
above 0xFFFF, where it used to throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 11:25:04 -03:00
orezraeyandClaude Opus 5.5 92448b72f9 fix(libkernel): accept any block size and a null block in the system software version getters as measured on a PS5
On PS5 firmware 13.60 sceKernelGetProsperoSystemSwVersion and
sceKernelGetSystemSwVersion return 0 for every value in the leading size
field, keep it, write the string and the packed version, and return 0
without writing for a null block.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 11:19:52 -03:00
Adrià FranchandClaude Sonnet 5.5 f63b27bdaa feat(libkernel): implement getlogin
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 15:07:38 +01:00
Yunus Shaikh 8be8dc83af Merge main into fix/libkernel-signal-handler-mask
Main's #10706 moves the declarations of exported functions and their types
into the libraries' public headers, and gives WaitForPendingInSet a
KernelTimespec timeout. The merge keeps this branch's DeliverUnblockedPending
and ChangeBlockedMask with main's KernelTimespec. It takes main's side of
the declarations in GuestSignalSets.cpp, whose setjmp and longjmp this
branch had added and libc's Api.hpp now declares. GuestSignalHandlerMask.cpp
includes the libkernel and libc public headers in place of its own
declarations and GuestSignalSet and GuestSigaction types, as the
public_headers audit requires.
2026-10-25 07:05:46 -07:00
GruzzberryandClaude Opus 5.5 e6b07323de feat(libkernel_sys): implement settimeofday
FreeBSD 11.4's kern_settimeofday rejects a timeval with a microsecond
field outside 0 to 999999 or a negative second field with EINVAL before
changing anything, sets the clock from a valid timeval, and then stores
the timezone, which gettimeofday reports. settimeofday now checks the
timeval the same way and throws for a valid one, as clock_settime does,
because the host clock is not changed. A timezone given without a
timeval is stored and gettimeofday reports it instead of 0 and 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 13:20:31 +00:00
harisibrar1andClaude Opus 5.5 e829b5c331 fix(libkernel): fail SO_ACCEPTFILTER with EINVAL on a socket that is not listening as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 09:15:05 -04:00
fogydes bde7cc210a fix(libkernel): report ECHILD to a Windows waiter another thread reaps first 2026-10-25 13:57:18 +01:00
fogydes 0514307ab8 fix(libkernel): translate waitpid child statuses to the guest numbering 2026-10-25 13:57:18 +01:00
fogydes df18d83072 docs: add the spawn role variable and shorten the waitpid debt 2026-10-25 13:57:18 +01:00
fogydes 723d932f73 feat(libSceLibcInternal): implement posix_spawn process creation and reaping 2026-10-25 13:57:17 +01:00
Adrià c2e087b2a6 Merge pull request #7049 from blawesom/followup/6510
fix(libkernel): retire an EV_ONESHOT note through its delete callback and follow Windows $Deleted paths
2026-10-25 12:38:21 +01:00
orezraeyandClaude Opus 5.5 b3b0760369 Merge main into fix/libkernel-rtld-thread-atexit-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 08:05:05 -03:00