Commit Graph
9104 Commits
Author SHA1 Message Date
MarcZX10 911024bd13 docs: link the cancellation points to the libkernel debt file
TechnicalDebt.md only links back to this section; the list of calls that
act on a cancellation request and the note on the asynchronous type are
the Thread cancellation entry of debt/libkernel.md.
2026-10-27 20:14:41 +00:00
MarcZX10 33577c6eab docs: describe the macOS guest entry that Aps5StartGuest provides
The table said Aps5StartGuest had no implementation on main, but
MainThreadMacOs.cpp defines it and libkernel's CMakeLists builds it. It
starts the guest on a second pthread (at least 8 MiB of stack) as
entry(block, nullptr) while the main thread runs the CFRunLoop, and it
aborts if the entry returns.
2026-10-27 20:14:32 +00:00
MarcZX10 846c386cd8 docs: give the zero padding of the submission dump file names
SubmissionCapture formats the file name with %06llu, as the PM4 replay
tests expect (submission_000006.bin).
2026-10-27 20:05:07 +00:00
MarcZX10 cb7a97d4d4 docs: say how compute pipeline capture reacts to its limits
The directory limits (128 records, 256 MiB) throw CaptureLimit, which
WriteOptional catches: capture disables itself with one stderr line and
the pipeline is still created. Only the per-record 36 MiB limit throws
out of the capture, so the old sentence described both as an error.
2026-10-27 20:05:07 +00:00
MarcZX10 e7ab802c95 docs: correct the trace event buffer sizes in the build guide
TraceThread::Slice holds five eight-byte members (scope, stage, begin,
length and the recorder batch), so an event takes 40 bytes, not 32.
The example sizes follow: 10 MiB at the default 262,144 events, 120 MiB
at 3,145,728 and 160 MiB at the 4,194,304 maximum.
2026-10-27 20:05:07 +00:00
PrivacyOnion a6cd8c57c6 feat(libSceFrontPanelDisplay): add skeleton library and 3 ps5rs-listed stubs 2026-10-27 20:53:30 +01:00
Dean Galvin 4d954209d2 Merge branch 'main' into feat/agc-unclamped-normalized-blend-v2
# Conflicts:
#	core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
2026-10-28 08:44:09 +13:00
Evrim Cicek f658dd8dad fix(libkernel): convert a directory flock in place as FreeBSD does on Windows 2026-10-27 22:32:46 +03:00
Dean Galvin d4a296d863 Merge main into perf-D2-v47: depth export tail moves to request version 49
Main took request serialization version 48 for the fragment barycentric
built-ins flag (#9193). The depth export clamp bounds are now written at
version 49 and read only for versions from 49, so a version 48 request as main
writes it still decodes, with default bounds. Tests: version 49 is the
emitted prefix, 50 the first unsupported one, a depth exporting request
without its bounds decodes at 48, 47 and 46 (the last two without main's
barycentric byte), and a version 48 two-sample dithered request decodes as
written.
2026-10-28 08:24:34 +13:00
KernelPanicNT 625a3fbb62 fix(libkernel): store any scePthreadMutexattrSetkind kind as firmware 13.42 does
scePthreadMutexattrSetkind called NotImplemented_nid_no_patch for a kind
outside 1 to 4. Firmware 13.42's libkernel, run in an emulator, makes it
call pthread_mutexattr_setkind_np, which stores any kind as a signed
16-bit value and returns 0, and turns a null attribute's -1 with errno 22
into 0x8001FFFF. It now forwards to pthread_mutexattr_setkind_np and
converts the result with sceKernelError, so a null attribute or object
still returns 0x8001FFFF and now also sets errno 22.

An out-of-range kind is refused by scePthreadMutexInit with 0x80020016,
leaving the mutex untouched, as measured for the same module.
scePthreadMutexattrGetkind is unchanged; kind 0 now reaches it and
returns 0.
2026-10-27 19:24:23 +00:00
KernelPanicNT 9ed4377be4 Merge main into fix/libkernel-mutexattr-setkind-any-kind 2026-10-27 19:22:42 +00:00
Kyon f3c9617021 chore(libressl3): separate inventory registration from pending edits 2026-10-27 19:14:05 +00:00
Kyon a36cdb3d6e feat(kernel-sys): complete unclaimed callable export inventory 2026-10-27 19:12:26 +00:00
Kyon 0bb4111af5 Merge remote-tracking branch 'origin/main' into feat/libressl3-1360-inventory 2026-10-27 19:12:26 +00:00
Kyon 5e7743cee0 feat(libSceLibreSsl3): complete callable export declarations and forwarding 2026-10-27 19:11:47 +00:00
Kyon 32c4c37457 Merge remote-tracking branch 'origin/main' into feat/kernel-sys-1360-inventory 2026-10-27 19:10:41 +00:00
Dean d13b3d7c55 Merge pull request #10575 from Mouhand-Kaddo/fix/agc-committed-reads-released-pages
fix(agc): read committed guest pages on Windows without faulting on released pages
2026-10-28 07:55:20 +13:00
milescovielloandClaude Opus 5.5 c7f22c2778 docs(libkernel): note how titles' libc reads the sanitizer replacement tables
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 18:51:10 +00:00
Evrim Cicek 5ab784048c fix(libkernel): lock directories with flock on Windows as FreeBSD does 2026-10-27 21:11:32 +03:00
Dean 14332cd8d0 Merge pull request #10721 from MarcZX10/marc/avcap2-declarations
feat(libSceAvcap2): declare 7 pending exports
2026-10-28 06:55:01 +13:00
Dean 1819607b25 Merge pull request #10701 from MarcZX10/marc/signatures-libscegnmdriverforneomode
feat(libSceGnmDriverForNeoMode): declare three stubs with shadPS4 signatures
2026-10-28 06:54:28 +13:00
Dean 1d0113de60 Merge pull request #10699 from MarcZX10/marc/signatures-libscenputility
feat(libSceNpUtility): declare two title context stubs with shadPS4 signatures
2026-10-28 06:53:56 +13:00
Dean ab6a87a163 Merge pull request #10460 from Danigamer05/feat/libc-unsigned-max64
feat(libc): implement unsigned 64-bit maximum
2026-10-28 06:53:22 +13:00
Claude dbce646e7b fix(libc): keep guest environment strings alive across setenv and unsetenv
setenv replaced a variable's string with a new allocation and freed the
old one, and unsetenv freed it as well, so a pointer that getenv had
returned for that variable dangled. A guest that reads such a pointer
after setenv(name, value, 1) reads freed host memory: AddressSanitizer
reports a heap-use-after-free on that read.

FreeBSD 11.4's getenv.c, which holds the setenv, unsetenv and putenv the
console's libc exports next to getenv, never frees a variable's string
("No previous variables are ever freed here to avoid causing a
segmentation fault in a user's code", lib/libc/stdlib/getenv.c lines
449-520 at 8c639945a4). setenv and unsetenv mark the old string
inactive; setenv writes the new value over the latest string of that
name when the value fits and allocates a new string otherwise; putenv
strings stay the caller's and are only forgotten.

The guest environment now keeps every string it allocates with its value
capacity and an active flag and follows that code: getenv and the time
zone lookup read the name's latest active string, setenv reuses the
latest string of the name when it fits, an unset one included, and
otherwise appends a new one and deactivates the old, putenv replaces an
earlier putenv string or deactivates the setenv one, and unsetenv
deactivates them all. Built on the host next to this library, FreeBSD's
getenv.c gave the same results, errno, pointer reuse and contents of
every earlier pointer over 160,000 random calls once the putenv flag it
leaves uninitialized in new setenv strings was cleared; the debt entry
records that the console may allocate where this reuses.

guest_environment checks the reuse, that earlier values stay readable
after a longer setenv and after unsetenv, and that putenv and setenv
leave each other's strings alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DXPnhogDW4zpeNCBro4Ctt
2026-10-27 17:39:23 +00:00
Adrià 254240c747 Merge pull request #11045 from roboterspinne/fix/relinker-macos-fixups-writable
fix(relinker): reject macOS fixups outside writable segments
2026-10-27 18:29:51 +01:00
Dean 594214f733 Merge pull request #11357 from oneandonlydean/sa/host-import-frame-eviction
fix(agc): do not evict host imports used in the current or previous frame
2026-10-28 06:23:09 +13:00
JJenkxandClaude Opus 5.5 79d65956a1 fix(libc): compute _Exp and _FExp as titles do
The libc.prx that titles ship evaluates the rational step as
((Q(z) + g*P(z)) + 1) / ((Q(z) - g*P(z)) + 1), with its own ln 2 split
and coefficients in the double case, and returns 1 only for arguments
within half an epsilon of zero. main used a different rational form
with a doubling step and an epsilon-wide shortcut, which left about one
result in five one ulp away from titles.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 13:18:32 -04:00
milescovielloandClaude Opus 5.5 ef0bfaa5f2 docs(libSceSaveData): record the sizes titles pass to sceSaveDataCreateTransactionResource
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 17:14:42 +00:00
Kyon 8e0bf2170f Merge remote-tracking branch 'origin/main' into feat/libressl3-1360-inventory 2026-10-27 17:08:39 +00:00
Kyon d86d7fc81e Merge remote-tracking branch 'origin/main' into feat/kernel-sys-1360-inventory 2026-10-27 17:08:39 +00:00
Kyon 5b25c2176d feat(libkernel_sys): declare 7 additional exports 2026-10-27 17:06:10 +00:00
Kyon 2b2c4c8ceb feat(libSceLibreSsl3): declare 10 additional exports 2026-10-27 17:06:09 +00:00
Dean f188470bca Merge pull request #11757 from milescoviello/docs/livestreaming-status-reads
docs(libSceGameLiveStreaming): note the status fields three titles read
2026-10-28 06:02:30 +13:00
Dean 0c4a8cb41a Merge pull request #11756 from milescoviello/docs/signin-dialog-result-callers
docs(libSceSigninDialog): note the result size and field three titles use
2026-10-28 06:01:55 +13:00
Dean bbb11b6974 Merge pull request #11062 from MarcZX10/marc/ci-nightly-sanitizers
ci: run every test under ASan and UBSan nightly
2026-10-28 05:58:34 +13:00
simnJS ad9a68f9ba feat(libSceNpMatching2): answer signaling connection status and context start abort offline
sceNpMatching2SignalingGetConnectionStatus reports every member inactive
for a known context, since no room is joined offline, and leaves the peer
address and port untouched; a null status pointer throws.
sceNpMatching2AbortContextStart returns NOT_INITIALIZED before
initialization and 0 afterwards. Checks follow shadPS4, with RPCS3's
differences recorded in the technical debt entry.
2026-10-27 17:57:03 +01:00
milescovielloandClaude Opus 5.5 a9c75fe408 docs(libSceNpTrophy2): link the handle teardown entry to Handle.cpp
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 16:43:14 +00:00
milescovielloandClaude Opus 5.5 fd72671b7d docs(libSceNpUniversalDataSystem): link the handle teardown entry to Handle.cpp
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 16:42:16 +00:00
simnJS a06fb13f6c fix(libSceAutoMounterClient): name the fields of the USB device-info output
The 816 bytes after the 128-byte device name are the PS4
SceAutoMounterClientUsbDeviceInfo fields up to the serial length in
flatz's ps4_stub_lib_maker_v2 header: the total and available space, the
vendor id, product id and release, and the manufacturer, product and
serial strings with their lengths. libSceUsbStorage's device-info record
starts with the same layout. Every field offset is now asserted; the
size and offsets do not change.
2026-10-27 17:23:33 +01:00
milescovielloandClaude Opus 5.5 177b1708a9 docs(libSceUserService): note the priorities ten titles pass to sceUserServiceInitialize
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 16:15:27 +00:00
slopgobblercobbler ff5da447b4 fix(libSceUserService): validate user in sceUserServiceGetPlatformPrivacyWs1 2026-10-27 16:51:54 +01:00
Adrià e0cd1259a9 Merge pull request #11254 from Michael-KD/fix/scalar-buffer-runtime-word3
fix(shader): ignore a runtime V#'s type for scalar buffer loads as RDNA2 does
2026-10-27 16:28:28 +01:00
Adrià 637522b6bf Merge pull request #11083 from slopgobblercobbler/fix/savedata-convert-null-parameter-validation
fix(libSceSaveData.native): return SAVE_DATA_ERROR_PARAMETER on null argument in sceSaveDataConvert
2026-10-27 16:21:11 +01:00
Adrià 6f7cb75291 Merge pull request #9193 from imellag/feat/shader-barycentric-builtins-moltenvk
feat(recompiler): read I/J from barycentric built-ins on MoltenVK
2026-10-27 16:21:05 +01:00
Sam d4c6770926 Merge branch 'main' into feat/sample-worker-queue 2026-10-27 15:09:08 +00:00
xXPBSXxandClaude Sonnet 5.5 e914dd269c fix(libc): return a zeroed parameter block for an executable without process parameters
Callers of ApplicationProcessParameters_nid_no_patch read the compiled SDK
version at offset 16 without a null check, so the null result for the
no-parameters record would crash them. The lookup now returns a static
zeroed 0x40-byte block for that record, and the heap recognises it by
address and keeps registering its default allocator.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-27 16:04:22 +01:00
Matheus Herberts 458da3450e feat(relinker): support packed ELF64 relative relocations 2026-10-27 11:58:24 -03:00
Danigamer05 f139bcf1fc feat(libc): implement signed 32-bit maximum value helper 2026-10-27 15:46:15 +01:00
Adrià e2a5118839 Merge pull request #11047 from imellag/feat/libkernel-macho-tls
feat(libkernel): thread-local storage for Mach-O guests
2026-10-27 15:18:46 +01:00
Kyon 7853f0fbc6 feat(libSceSystemLogger2Game): declare 2 additional exports 2026-10-27 14:14:56 +00:00