Commit Graph
2560 Commits
Author SHA1 Message Date
Adrià 0c9c5db748 Merge pull request #12690 from MarcZX10/feat/host-system-report
feat(agc): host system report and an actionable missing-Vulkan-feature message
2026-10-30 02:52:18 +01:00
Adrià 87d938c650 Merge pull request #12556 from babyhuey/fix/sched-efault
fix(libkernel): return EFAULT from rtprio_thread and sched_rr_get_interval for a bad pointer
2026-10-30 02:32:23 +01:00
Adrià 2485cdefa3 Merge pull request #12538 from babyhuey/fix/utimes-efault
fix(libkernel): return EFAULT from the utimes family for an unreadable times array
2026-10-30 02:31:43 +01:00
Adrià ec709cede3 Merge pull request #12436 from milescoviello/fix/vm-loadavg
fix(libkernel): answer vm.loadavg with the host's load averages
2026-10-30 02:31:30 +01:00
Adrià 365f857609 Merge pull request #12427 from simnJS/feat/kernel-is-neo-mode
feat(libkernel_sys): answer sceKernelIsNeoMode from the param.sfo Neo-mode attribute
2026-10-30 02:30:27 +01:00
Adrià 28b490ea5c Merge pull request #12296 from JJenkx/windows/kernel-shm-mmap-checks
fix(libkernel): map Windows shared memory with the regular file checks
2026-10-30 02:04:04 +01:00
Adrià f9a8813b11 Merge pull request #12179 from p3n1cillin/claude/kernel-executable-module-handle
feat(libkernel): add sceKernelGetExecutableModuleHandle
2026-10-30 02:01:01 +01:00
Adrià 4725feb152 Merge pull request #11431 from p3n1cillin/claude/pthread-getaffinity-set-size
fix(libkernel): answer pthread_getaffinity_np for the console's 8- and 16-byte sets
2026-10-30 01:20:44 +01:00
Adrià 96613bba67 Merge pull request #12060 from Ragbie/fix/windows-directory-flock
fix(libkernel): lock directories with flock on Windows as FreeBSD does
2026-10-30 01:04:03 +01:00
Adrià 438cebf361 Merge pull request #10544 from maximilianfv/fix/libkernel-macos-datagram-disconnect
fix(libkernel): count a dissolved datagram association as disconnected on macOS
2026-10-30 01:03:08 +01:00
Adrià 5a3c1a2f81 Merge pull request #10627 from maximilianfv/fix/libkernel-dlerror-long-messages
fix(libkernel): keep dlerror messages whole
2026-10-30 01:02:55 +01:00
Adrià 83861d9909 Merge pull request #12068 from dantdmdarealguy/fix/relinker-cli-off-test-registrations
fix(build): skip the core/libs relinker CLI tests when ANYPS5_RELINKER_CLI is OFF
2026-10-30 00:28:20 +01:00
Adrià 788e5531a1 Merge pull request #12163 from slopgobblercobbler/fix/libkernel-windows-descriptor-socket-classification
fix(libkernel): classify guest sockets on Windows and align errno parity
2026-10-29 23:46:12 +01:00
Adrià d820fef182 Merge pull request #12503 from babyhuey/fix/kevent-efault
fix(libkernel): return EFAULT from kevent for an unreadable changelist or timeout or an unwritable eventlist
2026-10-29 22:49:08 +01:00
Adrià cfbca30026 Merge pull request #12206 from XairRrR/fix/libkernel-tsc-time-scale
fix(libkernel): scale the reported TSC frequency under APS5_TIME_SCALE
2026-10-29 21:20:59 +01:00
Adrià 1aff97d3c8 Merge pull request #12093 from dantdmdarealguy/fix/kqueue-windows-snapshot-times
fix(libkernel): read a watched file's times again after its size on Windows
2026-10-29 21:20:39 +01:00
Adrià 184afa49ad Merge pull request #12563 from babyhuey/fix/setrlimit-efault
fix(libkernel): return EFAULT from setrlimit for an unreadable limit
2026-10-29 20:35:45 +01:00
Adrià 43332e5f3b Merge pull request #11865 from ionut27001/fix/libkernel-sched-own-pid
fix(libkernel): sched_getparam reads out-of-range priorities, sched_setparam EPERM outside 256-767, own pid on the main thread
2026-10-29 20:34:52 +01:00
MarcZX10 3a74ce471c feat(libkernel): export the host CPU probe to other libraries through extern C helpers
The patched libkernel does not hand its plain C++ functions to the other patched libraries: every cross-library call in the tree goes through an extern C helper with a _nid suffix. The host CPU probe had none, so a library that wants the CPU model or the missing feature list cannot reach it. These helpers return plain structs, as the application metadata helpers do.
2026-10-29 14:20:35 +00:00
Adrià 01f4e342d5 Merge pull request #12525 from babyhuey/fix/pselect-efault
fix(libkernel): return EFAULT from pselect for an unreadable timeout or signal mask
2026-10-29 14:59:14 +01:00
Adrià 9036e3c9e4 Merge pull request #12126 from morten-holm/fix/macos-host-stack-above-arena
fix(libkernel): move the macOS main stack out of the guest arena
2026-10-29 14:51:57 +01:00
Adrià a12a2fcfc4 Merge pull request #12462 from babyhuey/fix/poll-efault
fix(libkernel): return EFAULT from poll for an unreadable or unwritable descriptor array
2026-10-29 14:39:55 +01:00
Adrià cba260828e Merge pull request #11864 from ionut27001/fix/libkernel-get-app-info-layout
fix(libkernel): fill 0x58-byte sceKernelGetAppInfo record, throw for other pids
2026-10-29 14:33:12 +01:00
Adrià efc24518bc Merge pull request #11862 from ionut27001/fix/libkernel-setrlimit-store-limits
fix(libkernel): store setrlimit RLIMIT_CORE soft limit, ignore raised DATA/STACK hard limits
2026-10-29 13:47:57 +01:00
JJenkxandClaude Opus 5.5 dc1d801c4c fix(libkernel): map Windows shared memory with the regular file checks
On Windows, mmap sent a shared memory descriptor straight to the shared
file mapper, skipping the checks and the private path that a regular
file descriptor takes. A private mapping of a named or anonymous object
then failed with EOPNOTSUPP, and a writable shared mapping of a
read-only descriptor failed with EIO instead of EACCES. Shared memory
objects are files on Windows, so they now take the same access checks
and the same private copy as a regular file; only the directory, device
and file-type refusals stay limited to other descriptors.

guest_named_shm_windows_mapping covers shared mappings through two
descriptors, pread and pwrite against them, an offset mapping, a private
mapping, read-only mappings and the mappings after shm_unlink.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 08:47:28 -04:00
p3nicillinandClaude Opus 5.5 7c97d68937 fix(libkernel): throw for every set size the console was not measured with
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 12:18:00 +00:00
p3nicillinandClaude Opus 5.5 b4861eb197 fix(libkernel): answer pthread_getaffinity_np for the console's set sizes
PS5_PayloadSDK measured in a title (firmware 12.09) that
pthread_getaffinity_np answers sets of 8 and 16 bytes and returns ERANGE
for 32 bytes or more, so FreeBSD's 32-byte cpuset_t is refused. The call
accepted exactly 32 bytes and refused every other size. Sizes under 8
keep ERANGE; 17 to 31 bytes, between the measured sizes, throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 12:18:00 +00:00
p3nicillinandClaude Opus 5.5 4cf7411a46 feat(libkernel): add sceKernelGetExecutableModuleHandle
Return the main program's handle, the first one sceKernelGetModuleList
lists and one sceKernelGetModuleInfo accepts. reSOT (PPSA99023) imports
it from libkernel and passes the handle to sceKernelGetModuleInfo to find
its own code segment; before this its eboot failed to load on the
unresolved import.

The PS5 3.20 export lists have it in libkernel as well as libkernel_sys,
and on Windows a libkernel import never reaches libkernel_sys, so the
throwing libkernel_sys stub moves to libkernel as pselect did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 12:17:59 +00:00
Adrià 5454cd2e45 Merge pull request #11130 from imellag/perf/macos-mimalloc
feat(libs): let relinked macOS games opt into mimalloc
2026-10-29 12:58:23 +01:00
Adrià 578b8311ac Merge pull request #11267 from kallmek3nny/feat/libkernel-sem-setname
feat(libkernel): implement sem_setname
2026-10-29 11:31:34 +01:00
Adrià 0e5dad41c2 Merge pull request #9575 from DavidSamir/feat/libkernel-kqueue-evclear
feat(libkernel): support EV_CLEAR on a kqueue watched by another kqueue
2026-10-29 11:23:08 +01:00
Adrià 2257ffde7b Merge pull request #9473 from cadenasynyster/fix/windows-directory-link-rmdir-unlink
fix(libkernel): rmdir and unlink on a Windows directory link
2026-10-29 09:31:36 +01:00
Adrià c70c75ad13 Merge pull request #9284 from DavidSamir/feat/libkernel-sys-ksem-unnamed
feat(libkernel): implement the unnamed ksem semaphores
2026-10-29 08:48:19 +01:00
Dean 2960e9a6e7 Merge pull request #12705 from DeveshB-1/fix/fionread-efault
fix(libkernel): return EFAULT from ioctl FIONREAD for an unwritable argument
2026-10-29 18:50:49 +13:00
Dean e0a11b3fba Merge pull request #9515 from EagleBearerYS/fix/libkernel-getsockopt-net-sockets
fix(libkernel): getsockopt reads options of libSceNet sockets
2026-10-29 18:49:11 +13:00
DeveshB-1 1a47f9f0ee fix(libkernel): return EFAULT from ioctl FIONREAD for an unwritable argument 2026-10-29 09:15:45 +05:30
slopgobblercobbler 9d41d12f64 fix(libkernel): classify guest sockets on Windows and align errno parity 2026-10-29 00:45:11 +01:00
Dean 3a2b919816 Merge pull request #11863 from ionut27001/fix/libkernel-soc-sensor-channels
fix(libkernel): return -49 from sceKernelGetSocSensorTemperature channel 64 as a PS5 payload process does
2026-10-29 12:17:03 +13:00
Dean 711c4eca09 Merge pull request #11785 from ionut27001/fix/libc-hardware-concurrency
fix(libc): return the CPU count of the default thread mask from std::thread::hardware_concurrency
2026-10-29 12:16:46 +13:00
Dean 9412e47af6 Merge pull request #12579 from babyhuey/fix/fionbio-efault
fix(libkernel): return EFAULT from ioctl FIONBIO for an unreadable argument
2026-10-29 12:15:13 +13:00
babyhuey e73a56f8ab fix(libkernel): bound kevent's staging buffer at 1024 events
The staging buffer was sized by the guest's nevents, so a request for
INT_MAX events allocated about 64 GiB before the queue reported how many
were pending. It's now bounded at 1024 events; kevent may return fewer
than requested, and events left in the queue come back on the next call.
The test covers an INT_MAX request and a 1030-event queue, and moves away
from the end of StandardInput and the start of main, where #9575 and
#10014 also add tests.
2026-10-28 18:59:45 -04:00
babyhuey 24135ac3a5 fix(libkernel): copy the rtprio_thread RTP_SET struct in after the thread lookup
FreeBSD's sys_rtprio_thread returns ESRCH for an unknown lwpid before a
failed copyin of the struct, so the copy-in now follows the thread
lookup, and RTP_SET with an unknown lwpid and an unreadable struct
reports ESRCH. Tests pin that order and sched_rr_get_interval's pid check
before its copy-out.
2026-10-28 18:59:00 -04:00
Dean d775fc5958 Merge pull request #11403 from MarcZX10/marc/fix-libkernel-shm-anon-windows
fix(libkernel): recognize Windows anonymous shared memory descriptors
2026-10-29 11:49:22 +13:00
milescovielloandClaude Opus 5.5 ea0b9c1272 fix(libkernel): zero vm.loadavg's padding and clamp the scaled averages
GuestLoadAverage's braced initializer left its four bytes of padding after ldavg indeterminate, and the sysctl copies all 24 bytes to the guest. The scaled value of a load over UINT32_MAX / 2048 was converted out of range. The test now checks the padding and the exact fscale 2048 scaling against the host averages read just before and after the call.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 20:32:29 +00:00
Dean 319621ba2e Merge pull request #12339 from medazizktata/fix/windows-exec-shared-mapping
fix(libkernel): map shared memory and files executable on Windows
2026-10-29 07:28:16 +13:00
Dean 1235db19dc Merge pull request #11500 from xXPBSXx/test/pthread-mutex-trylock-behavior
test(libkernel): cover the return values of pthread_mutex_trylock
2026-10-29 07:20:19 +13:00
babyhuey b4ae3afc61 fix(libkernel): return EFAULT from ioctl FIONBIO for an unreadable argument
ioctl(FIONBIO) read its int argument directly after the existing null
check, so a non-null pointer into unmapped memory crashed the host.
FIONBIO is an _IOW request, which FreeBSD copies in and fails with
EFAULT; the argument is now copied in with GuestCopyIn_nid_no_patch
before the status change.
2026-10-28 14:19:31 -04:00
ionut27001 7dc80f7f37 fix(libkernel): fill 0x58-byte sceKernelGetAppInfo record, throw for other pids 2026-10-28 20:16:32 +02:00
babyhuey 24e823c688 fix(libkernel): return EFAULT from setrlimit for an unreadable limit
setrlimit read the guest rlimit struct directly, so a non-null pointer
into unmapped memory crashed the host. It now copies the struct in with
GuestCopyIn_nid_no_patch together with the existing null check, before
the resource check, as FreeBSD's sys_setrlimit copies in before
kern_setrlimit validates the resource, and fails with EFAULT.
2026-10-28 14:16:00 -04:00
babyhuey c565100965 fix(libkernel): return EFAULT from rtprio_thread and sched_rr_get_interval for a bad pointer
rtprio_thread read and wrote the guest rtprio struct in place, and
sched_rr_get_interval wrote the interval in place, so a non-null pointer
into unmapped or read-only memory crashed the host. rtprio_thread now
copies the struct in with GuestCopyIn_nid_no_patch before the thread
lookup for RTP_SET, as FreeBSD's sys_rtprio_thread does, and builds the
RTP_LOOKUP result locally and copies it out with
GuestCopyOut_nid_no_patch. sched_rr_get_interval copies its interval out
the same way. A failed copy returns EFAULT.
2026-10-28 14:15:57 -04:00