Commit Graph
2678 Commits
Author SHA1 Message Date
Dean 9f6d3b910c Merge pull request #7202 from MarcZX10/codex/lstat-long-windows-path-7201
fix(libkernel): support lstat on long Windows paths
2026-11-01 19:19:37 +13:00
Adrià 4547df009b Merge pull request #13874 from DeveshB-1/fix/sysarch-efault
fix(libkernel): return EFAULT from sysarch for invalid memory pointers
2026-11-01 06:47:19 +01:00
Adrià f377753dd2 Merge pull request #13854 from DeveshB-1/fix/sysctlnametomib-efault
fix(libkernel): return EFAULT from sysctlnametomib for invalid memory pointers
2026-11-01 06:05:23 +01:00
DeveshB-1 5d736ad55b fix(libkernel): return EFAULT from sysarch for invalid memory pointers 2026-11-01 05:55:56 +01:00
Dean 3741ca9327 Merge pull request #14197 from JJenkx/windows/libkernel-unlink-dangling-directory-link
fix(libkernel): unlink a dangling Windows directory symbolic link
2026-11-01 16:34:52 +13:00
Adrià 97ca8c8751 Merge pull request #13832 from zaryabzip/fix/pthread-cond-signalto-esrch
fix(libkernel): return ESRCH from signalto for a handle that is not a thread
2026-11-01 04:28:11 +01:00
Dean 90a01f0770 Merge pull request #13824 from zaryabzip/feat/sysutil-notification-with-text
feat(libSceSysUtil): send text notifications as firmware 13.42 does
2026-11-01 14:24:52 +13:00
Adrià 666d9b10a5 Merge pull request #13790 from DeveshB-1/fix/allowed-sdk-version-efault
fix(libkernel): return EFAULT from sceKernelGetAllowedSdkVersionOnSystem for an unwritable store
2026-11-01 02:23:24 +01:00
Adrià cd35d6103a Merge pull request #13798 from pushkarreddyy/fix/app-info-efault
fix(libkernel): return EFAULT from sceKernelGetAppInfo for invalid memory pointers
2026-11-01 02:22:03 +01:00
Adrià cae3edaf11 Merge pull request #13738 from Gruzzberry/fix/poll-efault
fix(libkernel): fail poll with EINVAL when nfds exceeds the descriptor limit
2026-11-01 01:40:45 +01:00
Dean 5722c14bd5 Merge pull request #6830 from ErenYeager1836/feat/libSceDbgThreadSanitizer-noop-stubs
feat(libSceDbgThreadSanitizer): add no-op implementations for __tsan_acquire and __tsan_release
2026-11-01 13:18:36 +13:00
Adrià 8bf03654ed Merge pull request #13769 from Flamefusion/feat/libkernel-has-trinity-mode
feat(libkernel): implement sceKernelHasTrinityMode for a base PS5
2026-11-01 00:54:50 +01:00
Adrià 577fe6329e Merge pull request #13756 from Gruzzberry/fix/recvfrom-sendto-efault
fix(libkernel): fail sendto and recvfrom with EFAULT on an unusable pointer
2026-11-01 00:54:10 +01:00
Adrià 3f6c712b77 Merge pull request #13746 from Gruzzberry/fix/prot-group-pgid-errnos
fix(libkernel): match FreeBSD 11.4 getgroups size and setgroups limit
2026-11-01 00:53:56 +01:00
JJenkxandClaude Opus 5.5 b476f50b8e fix(libkernel): unlink a dangling Windows directory symbolic link
sceKernelUnlink takes its Windows directory-link path only when
std::filesystem::symlink_status reports a directory, but MinGW's
symlink_status follows the link. A directory symbolic link whose target
is missing therefore looked like a file, went to the file delete, and
failed with EACCES, because Windows removes a directory link only
through RemoveDirectoryW. guest_filesystem stops there on any Windows
host that may create symbolic links.

The directory path is now also taken when the link itself carries both
FILE_ATTRIBUTE_DIRECTORY and FILE_ATTRIBUTE_REPARSE_POINT, which
GetFileAttributesW reports without following the link.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-31 18:57:56 -04:00
DeveshB-1 dca2c61801 fix(libkernel): return EFAULT from sceKernelGetAllowedSdkVersionOnSystem for an unwritable store 2026-10-31 23:49:53 +01:00
Adrià c21eb9a4d0 Merge pull request #13742 from Gruzzberry/fix/socketpair-efault
fix(libkernel): fail socketpair with EFAULT on an unusable result pointer
2026-10-31 22:42:51 +01:00
Adrià 05ff2857e6 Merge pull request #13710 from dantdmdarealguy/agent/cifails4
test(libkernel): run guest_timed_wait_cpu alone on Windows
2026-10-31 22:38:42 +01:00
Adrià cac9da41e4 Merge pull request #13725 from cocoa55/fix/cond-relock-spin
fix(libkernel): spin and yield when a condition variable wait relocks its mutex
2026-10-31 22:20:43 +01:00
Adrià bdabbb8415 Merge pull request #13668 from notHaze/fix/libkernel-close-observer-init
fix(libkernel): initialize close observer registry on first use
2026-10-31 12:51:49 +01:00
Adrià e23eea90e2 Merge pull request #13660 from w4rc0n/fix/sched-own-pid-main-thread
fix(libkernel): select the registered main thread for own-pid scheduling
2026-10-31 12:45:48 +01:00
GruzzberryandClaude Sonnet 5.5 0d2ae1a300 fix(libkernel): release both socketpair descriptors when the copyout or registration throws
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 11:43:00 +00:00
GruzzberryandClaude Sonnet 5.5 6f42ff85b5 fix(libkernel): fail socketpair with EFAULT on an unusable result pointer
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 11:31:59 +00:00
GruzzberryandClaude Sonnet 5.5 ba9200abc0 fix(libkernel): fail poll with ENOMEM when the descriptor copy cannot be allocated
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 11:16:20 +00:00
GruzzberryandClaude Sonnet 5.5 028b2b5336 fix(libkernel): fail poll with EINVAL when nfds exceeds the descriptor limit
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 11:16:10 +00:00
GruzzberryandClaude Sonnet 5.5 736f3c9d41 fix(libkernel): fail sendto and recvfrom with EFAULT on an unusable pointer
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 11:06:56 +00:00
DeveshB-1 dd46d6ada3 fix(libkernel): return EFAULT from sysctlnametomib for invalid memory pointers 2026-10-31 15:02:53 +05:30
akkadbakkad89andDevin 58295ef071 fix(libkernel): accept semaphore attribute bits 0x100 to 0x102
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-31 09:47:05 +01:00
zaryabzip 0a5c3be283 fix(libkernel): return ESRCH from signalto for a handle that is not a thread
scePthreadCondSignalto and pthread_cond_signalto_np answered EPERM for a
handle that is not a live thread, where a PS5 on firmware 13.60 returns
ESRCH. The check sits between the null-thread and not-waiting checks, as
that console orders them.
2026-10-31 13:37:23 +05:00
zaryabzip 520a8249a3 feat(libSceSysUtil): send text notifications as firmware 13.42 does
sceSysUtilSendSystemNotificationWithText builds the 0xc30-byte request
the 13.42 library builds (kind 5, the type at +0xc, at most 179
characters of text at +0x2d, an empty text for a null message) and
returns what sceKernelSendNotificationRequest returns. That call now
prints kind 5 requests as it prints kind 0 ones.

Replaces #9081 by @shanu337.
2026-10-31 13:13:56 +05:00
pushkarreddyy 16b53200f3 fix(libkernel): preserve caller errno across sceKernelGetAppInfo guest memory write 2026-10-31 12:58:28 +05:30
pushkarreddyy d60500a34b fix(libkernel): return EFAULT from sceKernelGetAppInfo for invalid memory pointers 2026-10-31 12:52:31 +05:30
Flamefusion 7b477b6d66 feat(libkernel): implement sceKernelHasTrinityMode for a base PS5
sceKernelHasTrinityMode returns 0, the answer of a base PS5, as
sceKernelIsTrinityMode already does. Two public readings of firmware
libkernel (OpenAGC for 11.60, Backport for 11.00 to 12.70) say it
compares hw.sce_main_socid with its low five bits cleared against
0x840fc0; the base PS5 SoC id recorded for sceKernelGetMainSocId,
0x840f80, fails that test. The prototype int (void) comes from the 23
calls in a UE5 title, each storing setne of the result in a guarded
static with no argument set up.

Titles import it from libkernel, but only the libkernel_sys placeholder
inventory exported it, as a throwing stub. The export moves to libkernel
next to sceKernelIsTrinityMode, and the inventory and its counts drop
the entry. guest_operation_mode checks the result.
2026-10-31 10:42:24 +05:30
Adrià 0835ec8bdc Merge pull request #13576 from pushkarreddyy/fix/direct-memory-queries-efault
fix(libkernel): return EFAULT from direct memory queries for invalid memory pointers
2026-10-31 05:15:50 +01:00
Adrià 696215b704 Merge pull request #13556 from pushkarreddyy/fix/flexible-memory-queries-efault
fix(libkernel): return EFAULT from flexible memory queries and PRT aperture for invalid memory
2026-10-31 05:14:45 +01:00
Adrià d4627bad7b Merge pull request #13552 from pushkarreddyy/fix/system-version-efault
fix(libkernel): return EFAULT from system version queries for invalid memory
2026-10-31 05:10:40 +01:00
Adrià 69c43dd403 Merge pull request #13577 from pushkarreddyy/fix/login-efault
fix(libkernel): return EFAULT from getlogin_r and SetLogin for invalid memory pointers
2026-10-31 05:08:35 +01:00
cocoa55andClaude Opus 5.5 8c4cdf84a2 test(libkernel): count the yields a woken condition variable wait makes
The mutex yield step counts each yield in a counter that
MutexYieldsForTest_nid_no_patch reads. With no spins and a yield count
of 5, a waiter woken while another thread holds its mutex must yield
exactly 5 times before it blocks, for each mutex type and for the outer
level of a recursive mutex held twice. With WakingLock::lock calling
the native lock directly the count stays 0 and the test aborts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 23:37:35 -04:00
GruzzberryandClaude Sonnet 5.5 6787b7fa8d fix(libkernel): match FreeBSD 11.4 getgroups size and setgroups limit
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 03:18:40 +00:00
cocoa55andClaude Opus 5.5 16375634e3 fix(libkernel): spin and yield when a condition variable wait relocks its mutex
FreeBSD 11.4's _mutex_cv_lock takes the mutex back through
mutex_lock_common, so a woken waiter tries once, spins and yields by
the mutex's counts before it blocks. The wait here called the native
lock directly; it now goes through the same spin and yield path as
scePthreadMutexLock.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 22:47:35 -04:00
pushkarreddyy ba6940814e fix(libkernel): preserve errno across checked copies in sigwait 2026-10-31 08:16:23 +05:30
pushkarreddyy 9c5495b9e5 fix(libkernel): return EFAULT from sigtimedwait, sigwaitinfo and sigwait for invalid memory 2026-10-31 08:16:22 +05:30
pushkarreddyy 6c56fd9060 fix(libkernel): return EFAULT from flexible memory queries and PRT aperture for invalid memory 2026-10-31 08:15:41 +05:30
pushkarreddyy 9e915f9b62 fix(libkernel): return EFAULT from direct memory queries for invalid memory pointers 2026-10-31 08:14:53 +05:30
pushkarreddyy ce1c353f07 fix(libkernel): preserve errno and revert SetLogin in getlogin_r 2026-10-31 08:14:24 +05:30
pushkarreddyy b39c154ed2 fix(libkernel): return EFAULT from getlogin_r and SetLogin for invalid memory pointers 2026-10-31 08:14:24 +05:30
AdriàandClaude Sonnet 5.5 5c0646737d fix(libkernel): write only the version fields and keep errno in system version queries
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 07:55:32 +05:30
pushkarreddyy 1aae106249 fix(libkernel): return EFAULT from system version queries for invalid memory 2026-10-31 07:53:47 +05:30
Adrià 9eca75175e Merge pull request #13545 from pushkarreddyy/fix/page-table-stats-efault
fix(libkernel): return EFAULT from page table and trace memory stats for invalid memory
2026-10-31 03:16:52 +01:00
Adrià 4b7af94e1d Merge pull request #13537 from pushkarreddyy/fix/sendfile-efault
fix(libkernel): return EFAULT from sendfile for invalid memory pointers
2026-10-31 03:00:47 +01:00