Commit Graph
428 Commits
Author SHA1 Message Date
Adrià e335d5b5ba Merge pull request #7974 from DavidSamir/feat/libkernel-file-mmap-macos
feat(libkernel): map files through the guest's mmap on macOS hosts
2026-10-21 13:46:41 +02:00
Adrià de4ef842b5 Merge pull request #7850 from mugurc/feat/libkernel-sockets-macos
feat(libkernel): UDP sockets and name resolution on macOS hosts
2026-10-21 13:36:21 +02:00
Dean 3e91c8edf5 Merge pull request #8850 from UnhealthyKraken/feat/libkernel-cfsetspeed
feat(libkernel): implement cfsetspeed
2026-10-22 00:13:16 +13:00
Dean Galvin 0f7241f3a7 Merge origin/main into PR 6519 2026-10-21 21:35:27 +13:00
Dean ef1f41c4c9 Merge pull request #8061 from Dragost/fix/libkernel-pthread-yield-busy-spin
fix(libkernel): prevent 100% CPU busy-spinning on pthread yield on Windows
2026-10-21 20:57:20 +13:00
Dragost 2716dee730 fix(libkernel): prevent 100% CPU busy-spinning on pthread yield on Windows 2026-10-21 09:30:27 +02:00
Dean 9be6ccf60c Merge pull request #8255 from Nixitov/feat/process-abi-type
feat(libkernel): declare sceKernelGetProcessAbiType
2026-10-21 20:20:37 +13:00
Nixitov 4d83fece6d feat(libkernel): declare sceKernelGetProcessAbiType
AI-assisted: yes
2026-10-21 09:01:22 +02:00
Dean Galvin bc87535cb0 docs(dev): name retail titles by ID instead of by title
Debt entries name the titles they were measured on. Use the title ID, or "a retail title" where the sentence needs no identification. No technical content changes.
2026-10-21 17:34:40 +13:00
Kraken aae12fa111 feat(libkernel): implement cfsetspeed 2026-10-21 04:00:42 +01:00
Dean cd700fe9ec Merge pull request #8793 from xXPBSXx/fix/pthread-kill-ended-thread-esrch
fix(libkernel): let pthread_kill with signal 0 report ESRCH for a thread that has ended
2026-10-21 15:27:29 +13:00
Dean a806c69bfe Merge pull request #8758 from p3n1cillin/codex/pthread-getprio-20261021
feat(libkernel): implement pthread_getprio
2026-10-21 14:27:54 +13:00
Dean c5d841ed94 Merge pull request #8732 from DoubleAAGuy/feat/libkernel-osreldate-sysctl
feat(libkernel): expose kern.osreldate sysctl
2026-10-21 14:27:39 +13:00
Dean 8a803d3e6d Merge pull request #8743 from valenciana-nc/fix/kernel-iovec-table-copy
fix(libkernel): return EFAULT for unreadable iovec tables
2026-10-21 14:24:39 +13:00
xXPBSXxandClaude Sonnet 5.5 79569a7a3d fix(libkernel): let pthread_kill with signal 0 report ESRCH for a thread that has ended
pthread_kill(thread, 0) returned 0 for every handle other than the caller's before it asked whether the thread was still alive. FreeBSD's _pthread_kill looks the thread up with _thr_find_thread before it checks for signal 0, so the call answers ESRCH for a thread that has ended or was never a thread. The liveness check now runs before the signal 0 shortcut; the calling thread still answers 0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 02:29:54 +02:00
Dean f41c5bef2b Merge pull request #8637 from billythemenace2/fix/kernel-raise-system-call-wait
fix(libkernel): keep waiting while a raise target is inside a system call
2026-10-21 13:11:08 +13:00
p3nicillin 5a79dda21d feat(libkernel): implement pthread_getprio 2026-10-21 00:08:30 +01:00
valenciana-nc 23c43725f6 fix(libkernel): copy guest iovec tables before vector transfers 2026-10-20 17:04:30 -06:00
Dean 61d0fa5b3c Merge pull request #8304 from Aryansh1520/feat/libkernel-umtx-ops-sync
feat(libkernel): implement _umtx_op UMTX_OP_SEM_WAIT and UMTX_OP_SEM_WAKE
2026-10-21 11:50:34 +13:00
Hermes Agent 0273c1479f feat(libkernel): expose kern.osreldate sysctl 2026-10-20 18:29:40 -04:00
billythemenace2andClaude Opus 5.5 681926e085 fix(libkernel): keep waiting while a raise target is inside a system call
Since #8512 a raise redirects a target running host code once 50 ms have
passed since the raise began. A target inside a system call that is not a
wait, such as the NtWriteFile of an fwrite that holds its stream lock, can
stay there longer; the redirect then ran the handler with the lock held.
SONIC SUPERSTARS froze at frame 67 again on main this way, with its GC
raise delivered at ntdll!ZwWriteFile+20.

A target stopped right after a syscall instruction in ntdll now restarts
the 50 ms host-code window, so the raise keeps sampling until the call
returns and the target leaves host code, bounded by the 1 s retry limit.
guest_raise_in_system_call holds a writer in NtWriteFile on a slowly
drained pipe; it times out on main and passes with this change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 20:35:36 +01:00
Dean c70524a3db Merge pull request #8596 from ebarr24/ws/libkernel-kevent-note-lowat-above-1-on-e
fix(libkernel): fire EVFILT_WRITE on a socket once free send space reaches NOTE_LOWAT
2026-10-21 08:27:05 +13:00
Dean b7596be595 Merge pull request #6658 from nicolasabosch/perf/gpu-wake-sleeps
perf(libkernel): end short sleeps when the GPU or a flip completes
2026-10-21 07:55:28 +13:00
Dean 352dbe751a Merge pull request #8583 from Ondra97/codex/fix-pthread-attr-policy
fix(libkernel): report current thread scheduling policy in attributes
2026-10-21 07:14:27 +13:00
Ethan Barr 084dcf8736 fix(libkernel): fire EVFILT_WRITE on a socket once free send space reaches NOTE_LOWAT
kevent threw NotImplemented for EVFILT_WRITE with NOTE_LOWAT above 1 on a socket, although the socket readiness check already reports free send-buffer space (SO_SNDBUF less SIOCOUTQ on Linux). The write event now fires once that space reaches the mark, as FreeBSD 11's filt_sowrite compares sbspace with kn_sdata, and stays silent while the space is below it. The debt entry no longer says a write mark is limited to 1. Reference: https://github.com/freebsd/freebsd-src/blob/release/11.0.0/sys/kern/uipc_socket.c
2026-10-20 13:32:17 -04:00
Nicolas Abosch f857616caa Merge remote-tracking branch 'origin/main' into perf/gpu-wake-sleeps
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Execution/src/Driver/EntryPoints.cpp
#	core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
2026-10-20 14:29:10 -03:00
Dean ae12a951f5 Merge pull request #8114 from savvaniss/feat/declare-ps4-hasbro-imports
feat(libs): declare sceGameLiveStreamingEnableLiveStreaming and sceKernelPrintBacktraceWithModuleInfo
2026-10-21 06:19:07 +13:00
Ondra97 ad1650686c docs(libkernel): keep unmeasured policy query behavior concise 2026-10-20 19:18:49 +02:00
Ondra97 2f2fd0f7a4 docs(libkernel): keep attribute query limits with attribute debt 2026-10-20 19:08:27 +02:00
Ondra97 07486d7cfa fix(libkernel): report current thread scheduling policy in attributes 2026-10-20 19:05:08 +02:00
Dean 83751168dd Merge pull request #8202 from babyhuey/feat/libkernel-open-event-flag
feat(libkernel): implement sceKernelOpenEventFlag
2026-10-21 05:59:15 +13:00
Adrià 10e2cbf648 Merge pull request #7541 from ionut27001/fix/libkernel-sysctl-absent-names
fix(libkernel): return ENOENT for thirteen sysctl names, as measured on a PS5
2026-10-20 18:13:19 +02:00
Adrià 4036fab1b2 Merge pull request #7437 from lucaslima430/fix/libkernel-socket-fcntl-duplication
fix(libkernel): support socket fcntl duplication
2026-10-20 17:40:06 +02:00
Adrià 1e1a19bf48 Merge pull request #7075 from AlexOfTheForest/feat/kevent-pipe-write
feat(libkernel): support EVFILT_WRITE on the write end of a pipe
2026-10-20 17:15:03 +02:00
Dean 44e3389c88 Merge pull request #7807 from mazen320/fix/windows-stderr-dup2
fix(libkernel): keep host stderr off a guest dup2 onto descriptor 2
2026-10-21 01:45:30 +13:00
ionut27001andClaude Opus 5.5 dfa96f1fe6 fix(libkernel): return ENOENT for thirteen sysctl names, as measured on a PS5
In a payload process on a PS5 (firmware 12.70), sysctlbyname returns -1
with ENOENT for thirteen names that threw here, and leaves the buffer and
the length alone, for a read, a size query, a null length and a null
buffer with a null length. sysctl does the same for the fixed MIBs of
seven of them. sysctlnametomib gives those seven MIBs and returns ENOENT
for hw.cacheline_size and hw.usermem, which threw too.

machdep.cacheline_size already returned ENOENT and is now tested with
the others. A write to the new names and MIBs throws, as the console's
answer to a write was not tried. The hw.realmem and vm.overcommit debt
entries now say that a payload process gets ENOENT for them as well.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 13:46:29 +02:00
Queuze bbcce1736e fix(libkernel): support socket fcntl duplication 2026-10-20 13:40:22 +02:00
Adrià FranchandClaude Sonnet 5.5 99e56464a1 fix(libkernel): keep the PipeWrite full-pipe case off Windows and start its clock before the reader
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 13:35:07 +02:00
Alexej Szpevák bd8ee518c4 feat(libkernel): support EVFILT_WRITE on the write end of a pipe
kevent threw for EVFILT_WRITE on any descriptor that is not a socket. On the write end of a pipe it now follows FreeBSD 11's filt_pipewrite: data is the free buffer space, and once the read end is closed the event reports EV_EOF with data 0. Adding the event after the read end is closed fails with EPIPE, as in pipe_kqfilter. EVFILT_WRITE on the read end still throws, because FreeBSD's pipe ends are bidirectional and host pipes are not.
2026-10-20 13:34:50 +02:00
Adrià b9a097353c Merge pull request #7556 from MarcZX10/codex/libkernel-sysctl-mib-enoent
fix(libkernel): return ENOENT for measured absent sysctl MIBs
2026-10-20 13:23:08 +02:00
Adrià 437de6392f Merge pull request #7652 from billythemenace2/fix/kernel-raise-outside-host-code
fix(libkernel): redirect a raise only once the target leaves host code
2026-10-20 13:16:49 +02:00
MarcZX100 7b05271abb fix(libkernel): support kern.rng_pseudo MIB access 2026-10-20 12:29:39 +02:00
Adrià 9299e6fd8a Merge pull request #7542 from ionut27001/fix/libkernel-rng-pseudo-block
fix(libkernel): return kern.rng_pseudo in 64-byte blocks as measured on a PS5
2026-10-20 12:24:51 +02:00
Adrià a0e0985288 Merge pull request #7551 from mazen320/fix/open-nofollow-junction
fix(libkernel): stop O_NOFOLLOW from opening a Windows directory junction
2026-10-20 12:20:01 +02:00
MarcZX10 e054c83eea Merge upstream main into measured absent sysctl MIBs 2026-10-20 10:12:56 +00:00
mazen c03168fb47 fix(libc): keep guest stdio on a dup2 of descriptors 1 and 2
Host logging opens its own FILE on the saved descriptor. The guest FILE stays on the replaced descriptor, so guest printf, puts and fprintf still reach the pipe.
2026-10-20 13:38:07 +04:00
mazen 715fe9ca26 fix(libkernel): keep host stdout off a guest dup2 onto descriptor 1
The same guest dup2 that fills the stderr pipe also replaces descriptor 1, so host stdout was still writing into the guest pipe.
2026-10-20 13:38:07 +04:00
mazen 2d1c18410f fix(libkernel): keep host stderr off a guest dup2 onto descriptor 2
Guest dup2 onto 2 replaces the CRT descriptor fprintf(stderr) still uses, so host logs fill the 4 KiB guest pipe.
2026-10-20 13:38:06 +04:00
Aryan SharmaandClaude Haiku 5.5 4313a703ec feat(libkernel): implement _umtx_op UMTX_OP_SEM_WAIT and UMTX_OP_SEM_WAKE
Follow FreeBSD 11's do_sem_wait and do_sem_wake (COMPAT_FREEBSD9/10) on
a struct _usem: a wait sets _has_waiters, returns at once while _count
is non-zero and otherwise sleeps on the semaphore's queue; a wake clears
_has_waiters when one waiter is left and releases one waiter.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-20 15:01:48 +05:30
SebastianandClaude Opus 5.5 cfdaf2dbb8 feat(libkernel): implement fchflags
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QnkpF2oEMofseVz9Z7WEAC
2026-10-20 07:28:54 +00:00