Commit Graph
2095 Commits
Author SHA1 Message Date
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à 3a83687929 Merge pull request #9582 from UnhealthyKraken/fix/libkernel-variant-timedjoin
test(libkernel): cover sys and web timed join imports
2026-10-25 20:20:02 +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
Adrià 7a25f87620 Merge pull request #9500 from GitamarT045T3R/fix/libkernel-condattr-setclock
fix(libkernel): reject clocks libthr does not accept in pthread_condattr_setclock
2026-10-25 18:42:46 +01:00
Adrià 506991994d Merge pull request #9496 from Gruzzberry/fix/open-excl-symbolic-link
fix(libkernel): fail open with O_CREAT and O_EXCL on a Windows symbolic link
2026-10-25 18:35:57 +01:00
Adrià 30bef4b0c1 Merge pull request #9501 from GitamarT045T3R/fix/libkernel-process-cpu-clock
fix(libkernel): answer process CPU clocks like FreeBSD instead of throwing
2026-10-25 18:34:57 +01:00
Adrià 2e1c72239b Merge pull request #9487 from Gruzzberry/fix/chmod-symbolic-link
fix(libkernel): follow a Windows symbolic link in chmod
2026-10-25 18:25:24 +01: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
Adrià 4da123784e Merge pull request #9478 from EagleBearerYS/fix/libkernel-lstat-relinked-prx
fix(libkernel): resolve original .prx names to relinked .guest.prx in lstat
2026-10-25 18:06:42 +01: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
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 7faa3ea40b Merge pull request #9001 from Queuse/codex/test-siginterrupt-contracts
test(libc): cover siginterrupt state boundaries
2026-10-26 04:45:14 +13:00
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
Itamar Medyoni 3db438f997 fix(libkernel): answer process CPU clocks like FreeBSD instead of throwing
A clock id with CPUCLOCK_PROCESS_BIT threw in clock_gettime and
clock_getres. FreeBSD 11 get_cputime reads the process's CPU time, or
fails with EINVAL when pget finds no such process, and kern_clock_getres
gives every CPU clock the CPU time resolution without a lookup. The
guest's own process clock now reads CLOCK_PROCESS_CPUTIME_ID, any other
fails with EINVAL, as kill already finds no other process.
2026-10-25 16:07:10 +01:00
valenciana-nc 37ba4a9d2f fix(libkernel): reject ended threads in pthread_attr_get_np 2026-10-25 15:49:57 +01: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
fogydes 0514307ab8 fix(libkernel): translate waitpid child statuses to the guest numbering 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à FranchandClaude Sonnet 5.5 3bf3f7928b fix(libkernel): declare swapcontext in libkernel's Api.hpp
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 13:04:17 +01:00
David 5881575782 refactor(libkernel): export swapcontext from libkernel directly
The PS5 3.20 export lists have swapcontext in libkernel as well as
libkernel_sys, and on Windows a libkernel import never reaches
libkernel_sys. The assembly entry in UserContext.cpp now is
swapcontext_nid_postfix, and the libkernel_sys jump stub is gone.
2026-10-25 13:04:08 +01:00
David ad0d4f5995 feat(libkernel_sys): implement swapcontext 2026-10-25 13:04:08 +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
Yunus Shaikh 20ae347f6a Merge main into fix/libkernel-lstat-relinked-prx
Main's #9618 has lstat fill a local FileStat and copy it out to the guest.
The merge keeps that and this branch's module lookup in the same call, so an
original .prx name still resolves to its relinked .guest.prx.
2026-10-25 03:56:39 -07:00
orezraeyandClaude Opus 5.5 20b38adb09 Merge main into fix/libkernel-socket-address-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 07:53:50 -03:00
Adrià 35d22d88f9 Merge pull request #9618 from xXPBSXx/fix/output-structs-efault
fix(libkernel): fail the stat family with EFAULT when the output struct is not writable guest memory
2026-10-25 11:52:20 +01:00
Queuze 48c595d09d chore: sync PR 9001 with current main 2026-10-25 07:29:11 -03:00
Adrià 16025845e5 Merge pull request #9423 from AliZedan1A/fix/guest-path-efault
fix(kernel): safely copy guest path arguments
2026-10-25 10:48:00 +01:00
Adrià 119ae446ca Merge pull request #9555 from xXPBSXx/fix/fcntl-dupfd-limit-einval
fix(libkernel): fail fcntl F_DUPFD with EINVAL when the minimum descriptor is beyond the open file limit on Windows
2026-10-25 09:29:42 +01:00
ali zedan 2c5fcf6406 fix(kernel): safely copy guest path arguments 2026-10-25 08:28:09 +01:00
Dean 9a2020c220 Merge pull request #10425 from Retr0G28/fix/sendfile-nonregular-einval
fix(libkernel): fail sendfile with EINVAL for a file that is not a regular file
2026-10-25 19:29:21 +13:00
Dean b5f669fd0d Merge pull request #10777 from harisibrar1/fix/select-clear-bits-past-nfds
fix(libkernel): clear select bits from nfds to the end of their word
2026-10-25 19:04:39 +13:00
orezraeyandClaude Opus 5.5 65e712b9c6 Merge main into fix/libkernel-socket-address-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 23:32:33 -03:00
milescovielloandClaude Opus 5.5 6508231c0e fix(libkernel): measure the TSC frequency on one CPU
sceKernelGetTscFrequency times 20 ms of TSC ticks against the monotonic
clock. A thread that moves to another CPU during the sleep reads its end
value from another TSC. Where the TSCs of the CPUs differ, as on a Windows
VM whose vCPU 0 counts about 3.8 billion ticks ahead of the others, the
frequency came out as 0 or as 180 GHz. Pin the calibrating thread to the
CPU it runs on and restore its affinity afterwards.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 02:24:56 +00:00
Dean a2a67c726e Merge pull request #9059 from mehmetbayoglu/feat/libkernel-tls-get-addr
feat(libkernel): implement __tls_get_addr
2026-10-25 15:23:44 +13:00
Dean d7878da690 Merge pull request #9169 from slopgobblercobbler/fix/socket-addr-validation
fix(libkernel): validate address family against socket family in bind
2026-10-25 15:17:00 +13:00
MarcZX10 561ea1d4e9 fix(libkernel): check getrusage output pointers 2026-10-25 01:16:14 +00:00
slopgobblercobbler 7239ebb63e fix(libkernel): validate address family against socket family in bind 2026-10-25 02:14:14 +01:00
Dean c6b318cfd9 Merge pull request #9165 from MaxLikesCode/fix/pthread-timed-self-lock
fix(libkernel): time out timed locks of a lock the caller already holds
2026-10-25 14:01:45 +13:00
memob b9858031a7 refactor(libkernel): declare __tls_get_addr once with its real signature
The public header declared the unimplemented placeholder int __tls_get_addr(void). It now declares void* __tls_get_addr(const KernelTlsIndex*), the tls_index pointer the ABI passes, and the implementation and the test use that declaration and type instead of their own.
2026-10-24 20:30:50 -04:00
memob cf27259538 feat(libkernel): implement __tls_get_addr
Resolve a FreeBSD/ELF tls_index {module, offset} the way the relinker's
DTPMOD64 values are laid out: on Windows through the PE _tls_index the
module word points at and the thread's ThreadLocalStoragePointer, on
Linux through glibc's __tls_get_addr.
2026-10-24 20:29:20 -04:00
Dean b7865bbb6b Merge pull request #8344 from Retr0G28/fix/socketpair-getpeername-enotconn
fix(libkernel): return ENOTCONN from getpeername once a socketpair peer closed
2026-10-25 13:28:30 +13:00
MaxandClaude Opus 5.5 55ff5484d6 fix(libkernel): time out timed locks of a lock the caller already holds
scePthreadMutexTimedlock on a mutex the caller holds, and
scePthreadRwlockTimedrdlock and scePthreadRwlockTimedwrlock on a rwlock
it holds for writing, returned EDEADLK at once. The console returns
ETIMEDOUT, as the prosper console oracle measured. They now sleep until
the timeout and return ETIMEDOUT, as FreeBSD libthr does. The POSIX
timed locks call these and change with them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 02:15:31 +02:00
Dean cf528e78c6 Merge pull request #9160 from yabanana/feat/kernel-sys-thread-queries
feat(libkernel_sys): identify the initial pthread
2026-10-25 12:57:53 +13:00
harisibrar1andClaude Opus 5.5 a63d961916 fix(libkernel): clear select bits from nfds to the end of their word as FreeBSD copies them out
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 19:55:07 -04:00
xXPBSXxandClaude Sonnet 5.5 6457edc2fb fix(libkernel): fail fcntl F_DUPFD with EINVAL when the minimum descriptor is beyond the open file limit on Windows
fcntl(fd, F_DUPFD, min) with min at or above RLIMIT_NOFILE duplicated the
descriptor repeatedly until the CRT table was full and then failed with
EMFILE, after opening thousands of descriptors. FreeBSD checks the minimum
first: kern_dup returns EINVAL for FDDUP_FCNTL when new < 0 or
new >= maxfd (sys/kern/kern_descrip.c:836-840). Linux already answers
EINVAL through the host fcntl. Check the minimum against the guest
RLIMIT_NOFILE before the Windows loop.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 01:52:31 +02:00
Retr0 7a0bbc4897 Merge remote-tracking branch 'origin/main' into fix/sendfile-nonregular-einval
# Conflicts:
#	core/libs/tests/GuestSendfile.cpp
2026-10-25 02:47:13 +03:00
Dean 761cb46f84 Merge pull request #10350 from orezraey/fix/libkernel-socket-receive-flags-measured-ps5
fix(libkernel): keep the TCP flag and IP receive options a PS5 accepts
2026-10-25 12:44:40 +13:00
Dean Galvin dfb7022eb2 Merge main (check commit for the public_headers fix) 2026-10-25 12:43:33 +13:00