Commit graph

727 commits

Author SHA1 Message Date
clem-gb
15c1962e82 fix(libkernel): keep ymm upper halves across a redirected raise
A thread that sceKernelRaiseException redirects resumes through
RtlRestoreContext with a CONTEXT that has no XSTATE, so the upper halves
of ymm0-ymm15 came back as the handler and the delivery path left them.
A handler or host routine that runs vzeroupper or any VEX instruction
(Zen 2 guest code, the CRT's memcpy) cleared the upper lanes of a thread
interrupted in the middle of AVX code. The entry stub now stores
ymm0-ymm15 next to the delivery when the CPU and the OS enable AVX, and
the exit loads them back right before RtlRestoreContext, which restores
only the low halves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeC9bA3n74TzJRYv9AgBE8
2026-10-08 10:47:33 +02:00
Adrià
2c8c9634c3
Merge pull request #1176 from EdouardSence/fix/linux-anonymous-writable-image
fix(libc): back the main image's writable mappings with anonymous memory on Linux
2026-10-08 10:41:35 +02:00
Adrià
0e173a4634
Merge pull request #1143 from AchrafReyani/feat/libc-bad-weak-ptr
feat(libc): implement std::bad_weak_ptr and _Throw_bad_weak_ptr
2026-10-08 10:30:41 +02:00
Adrià
f6c33f0d04
Merge pull request #1131 from orbz22/feat/kernel-vectored-io-windows
feat(kernel): implement vectored file IO on Windows
2026-10-08 10:18:29 +02:00
Adrià
c081eb90dc
Merge pull request #1116 from Fishybeing/fix/libc-utf16-strings
fix(libc): read guest wide strings as 16-bit units
2026-10-08 10:15:55 +02:00
Achraf Reyani
df570de6d5 feat(libc): implement std::bad_weak_ptr and _Throw_bad_weak_ptr
BnMAMrsfVWo is _ZSt19_Throw_bad_weak_ptrv. Replace the unknown stub
with a throw of a guest std::bad_weak_ptr, and add its type info,
vtable, destructors and what().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 10:00:54 +02:00
Raihan Abdul Majid
87f4444441 fix(kernel): transfer each iovec directly on Windows
Gathering every iovec into one host buffer threw for a total above
INT_MAX, which a console readv/writev accepts, and copied the whole
transfer twice. Each iovec is now read or written in place, in chunks
of at most INT_MAX bytes. A readv on a pipe returns after one read so
it does not block once the available bytes are consumed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UTjpbMX7BUFMZZaxJE98zV
2026-10-08 09:52:49 +02:00
Adrià
8cb527165a
Merge pull request #1120 from TideOPL/feat/libc-sce-v2-runtime-symbols
feat(libc): export the __sce_v2 _Xbad_function_call and sized aligned delete
2026-10-08 09:40:20 +02:00
Fishybeing
cd39c8db54 fix(libc): read guest wide strings as 16-bit units
The guest's wchar_t is 16 bits, but wcslen, wcscmp, wcsncmp, wcscpy, wcsncpy, wcschr, wcsrchr, wcsstr, wcspbrk, wcsspn and the wmem functions forwarded to the host's wchar_t functions, which use 32-bit units on Linux. Implement them on char16_t. The wide conversions that still use the host's wchar_t are listed in TechnicalDebt.
2026-10-08 09:39:55 +02:00
Adrià
979ae68996
Merge pull request #1095 from kjhq/feat/libkernel-write-throttling
feat(libkernel): report no write throttling in sceKernelWriteThrottlingStatus
2026-10-08 09:11:51 +02:00
Adrià
f830fea754
Merge pull request #1094 from kjhq/feat/libkernel-mprotect
feat(libkernel): implement POSIX mprotect
2026-10-08 09:07:34 +02:00
Adrià
bc1fbe8158
Merge pull request #1110 from Sanjaysrinivas/fix/mspace-resize-overflow
fix(libc): reject overflowing mspace resizes
2026-10-08 08:46:42 +02:00
Adrià
5de0adf643
Merge pull request #1107 from Sanjaysrinivas/fix/libc-thread-safe-time
fix(libc): avoid time conversion races
2026-10-08 08:46:01 +02:00
Adrià
c3f4db777c
Merge pull request #1099 from winklemad/fix/sscanf-s-width-limited-fields
fix(libc): only fail sscanf_s fields when the buffer capped the width
2026-10-08 08:42:26 +02:00
Adrià
7ca179970c
Merge pull request #1437 from adriadam10/fix/unique-test-temp-paths
test: give fixed temp files a random suffix so parallel runs don't collide
2026-10-08 08:38:55 +02:00
Dean
66b9be6607
Merge pull request #1322 from TibixDev/pr/np-reachability-lifecycle
fix(npmanager): track reachability callback registration
2026-10-08 19:36:00 +13:00
Dean
a57ccfb426
Merge pull request #1275 from KSWORK2001/fix/libscertc-dostime-range
fix(libSceRtc): answer out-of-range years in sceRtcGetDosTime
2026-10-08 19:35:43 +13:00
Adrià Franch
25000541ad test: give fixed temp files a random suffix so parallel runs don't collide
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 08:31:16 +02:00
Adrià Franch
53a31b512e test(guest_memory): pin mprotect on an unmapped and a wrapping range
Both return -1/EINVAL: FreeBSD kern_mprotect (sys/vm/vm_mmap.c) maps only
PROTECTION_FAILURE, RESOURCE_SHORTAGE and OUT_OF_BOUNDS to their own errno, so
KERN_INVALID_ADDRESS falls to EINVAL.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 08:24:12 +02:00
kjhq
35ae8742a9 feat(libkernel): implement POSIX mprotect
mprotect changes the protection of guest memory through the same path
as sceKernelMprotect and reports failures through errno: EINVAL for a
null or overflowing range or a range the allocation tracker rejects,
ENOMEM when allocation fails. A zero length succeeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 08:24:06 +02:00
kjhq
295780ab20 feat(libkernel): report no write throttling in sceKernelWriteThrottlingStatus
The host has no SSD write budget, so the status reports the largest budget in its first qword and zeroes the rest.
2026-10-08 08:21:23 +02:00
Adrià
dcbf089d28
Merge pull request #995 from CnRJay/fix/appcontent-user-defined-params
fix(libSceAppContent): read user defined app params from param.json
2026-10-08 08:07:21 +02:00
Adrià
57b62cedf1
Merge pull request #1088 from kjhq/fix/libkernel-sockaddr-len
fix(libkernel): accept guest socket addresses whatever their sa_len
2026-10-08 08:07:17 +02:00
Adrià Franch
1b9a1243dc test(libSceAppContent): pin sceAppContentAppParamGetInt ids 0..5
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 07:49:22 +02:00
Chad
3b6183a208 fix(libSceAppContent): read user defined app params from param.json
sceAppContentAppParamGetInt numbers the SKU flag 0 and
USER_DEFINED_PARAM_1..4 as 1..4 (fpPS4 ps4_libsceappcontent). Id 1
returned the SKU flag and 2..5 returned zero. UFC 6 (PPSA23566) checks
that param 1 is its title number, userDefinedParam1 in param.json, and
crashes otherwise. Absent params read as zero.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 07:49:16 +02:00
Adrià
311c0493bd
Merge pull request #957 from JAB-dev/feat/kernel-flexible-internal-hint
feat(libkernel): accept flag 0x8000 in sceKernelMapNamedFlexibleMemoryInternal
2026-10-08 07:42:56 +02:00
Dean
c8a2f06325
Merge pull request #1248 from eliasbruno124-dev/fix/net-ipv6-any-current
fix(net): provide IPv6 unspecified address object
2026-10-08 18:29:31 +13:00
Dean
a7715e671f
Merge pull request #1109 from Sanjaysrinivas/fix/savedata-memory-write-preservation
fix(savedata): preserve memory on write failure
2026-10-08 18:28:14 +13:00
Dean
7753fb0165
Merge pull request #1407 from hugodearaujo/fix/voiceqos-init-error-codes
fix(voiceqos): return the console's sceVoiceQoSInit argument errors
2026-10-08 18:23:39 +13:00
TibixDev
e6324faef6 fix(npmanager): track reachability callback registration
Validate registration and unregister state in the existing offline model. Add lifecycle and invalid-argument coverage.

Written with AI assistance.
2026-10-08 08:23:31 +03:00
Dean
4f7c32a2df
Merge pull request #1295 from TibixDev/pr/tls-destructor-test
test(libc): resolve the library address in the TLS destructor test
2026-10-08 18:23:12 +13:00
Dean
d71cc683f2
Merge pull request #1397 from hugodearaujo/fix/rtc-parse-rfc3339-hardware
fix(rtc): match sceRtcParseRFC3339 to the console
2026-10-08 18:22:02 +13:00
Adrià
c6bb7c1025
Merge pull request #904 from merwie/fix/kernel-module-info-for-unwind
fix(libkernel): report guest unwind tables in sceKernelGetModuleInfoForUnwind
2026-10-08 07:21:21 +02:00
Dean
a8279c01ac
Merge pull request #1172 from emaurel/fix/system-font-test-windows
test(font): move the console font aside instead of deleting it while its face is mapped
2026-10-08 18:20:25 +13:00
Dean
d0b7ff98e9
Merge pull request #1149 from eliasbruno124-dev/fix/json-callback-export
fix(json2): support null-access callback spelling
2026-10-08 18:19:57 +13:00
Dean
b01673ac0a
Merge pull request #1129 from AaravMehta-07/test/exception-runtime-release
test(libc): keep exception runtime assertions enabled in Release
2026-10-08 18:19:44 +13:00
Dean
8180dc5b9c
Merge pull request #1118 from TideOPL/feat/pad-is-remote-controller
feat(libScePad): implement scePadIsRemoteController
2026-10-08 18:19:30 +13:00
Dean
e0924e28f1
Merge pull request #1160 from orbz22/feat/font-glyph-define-attribute
feat(font): accept sceFontGlyphDefineAttribute as a silent stub
2026-10-08 18:19:01 +13:00
Dean
1e05e4f953
Merge pull request #1096 from kjhq/feat/libscenet-in6addr
feat(libSceNet): export in6addr_any and in6addr_loopback
2026-10-08 18:18:40 +13:00
Dean
10cb0d208e
Merge pull request #1092 from kjhq/feat/libscehttp2-async
feat(libSceHttp2): complete asynchronous requests through the kqueue option
2026-10-08 18:18:26 +13:00
Dean
5850a6cd11
Merge pull request #1374 from gjonn/feat/tts2-unavailable
feat(libSceTextToSpeech2): report the speech engine as unavailable
2026-10-08 17:39:02 +13:00
Dean
2d0c53b637
Merge pull request #1209 from ZekkJJ/codex/reject-leading-zero-param-json
fix(libkernel): reject leading-zero numbers in param.json
2026-10-08 17:30:13 +13:00
Dean
cf3823dffe
Merge pull request #1354 from gjonn/feat/bluetoothhid-no-devices
feat(libSceBluetoothHid): add Bluetooth HID with no devices attached
2026-10-08 17:30:03 +13:00
Dean
9ba908c202
Merge pull request #1356 from gjonn/feat/pad-open-ext-special
feat(libScePad): report special controllers as not connected in scePadOpenExt
2026-10-08 17:27:00 +13:00
Dean
893af87af0
Merge pull request #1353 from gjonn/feat/mbus-no-devices
feat(libSceMbus): add the device service with no devices attached
2026-10-08 17:26:49 +13:00
Dean
4c380ae382
Merge pull request #1196 from MathiasDevelopes/feat/libc-hypot
feat(libc): implement hypot and hypotf
2026-10-08 17:21:39 +13:00
hugodearaujo
56e4ee3565 fix(voiceqos): return the console's sceVoiceQoSInit argument errors
Measured on a PS5 (firmware 13.60) through dlopen of
libSceVoiceQoS.sprx: a null block, any size other than exactly 0x40000,
and an app type other than 0x20000000 or 0x10000000 all return
0x804E0902 without touching the block, instead of throwing. A second
initialization returns 0x804E0905, as prosper reads from the module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:34:15 -03:00
Gjon Gojcevic
8d1d430599 feat(libSceTextToSpeech2): report the speech engine as unavailable
sceTextToSpeech2Initialize fails so titles skip narration; the other imported exports throw.
2026-10-08 15:31:10 +13:00
Gjon Gojcevic
54ed8e7f9c feat(libScePad): report special controllers as not connected in scePadOpenExt
Add scePadOpenExt for special ports, which return DEVICE_NOT_CONNECTED because the host has no special controller, and the extended read and report exports, which throw.
2026-10-08 15:31:10 +13:00
Gjon Gojcevic
cb00552dd6 feat(libSceBluetoothHid): add Bluetooth HID with no devices attached
Initialization and callback and device registration succeed, no device ever connects, and calls that need a device throw.
2026-10-08 15:30:58 +13:00