* docs: 6.0.0 changelog, README, FAQ and contributor docs Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * Release prep: version 6.0.0 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(ci): keep the leaked test pools reachable for LSan; skip the tiny-file floor under coverage - ava1-ctest diag/mgmt_fs: the &'static Pool each test leaks for AvaTransport::with_pool is now held in a static list, so LeakSanitizer sees it (and the sessions on its threads) as reachable instead of reporting ~140 KB of indirect leaks the frame-name suppression could never match. Verified under clang ASan+LSan in Linux Docker: diag 13/13, mgmt_fs 40/40. - download.rs tiny-file throughput floor is skipped when cargo-llvm-cov runs (CARGO_LLVM_COV set): instrumentation slows every call several times over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(test): data_rust servers use the clients' fast timing Five folder-host tests gave the client fast timing (dead after 500 ms) but left the server on the default (ping every 2 s). On a slow runner a half-second gap made the client drop healthy lanes and the job stalled until the 36 s progress limit (both CI runs on #374/#377). The ordered-download tests already set both ends; these now do too. The app uses one timing on both ends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(test): the C lane socket-buffer test accepts Linux's wmem_max cap Same cap as the Rust lane test: Linux CI gives the send side 416 KiB, so the 1 MiB floor failed under ASan in CI. 128 KiB is still far above a default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(ci): gcc unused-result in the FTP selftest, serial ctest in make test, sender state on failure Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(ava1): flush a partial bundle after any reader message, not only a record The last small-file record could arrive while a large file's chunk or root was still queued behind it: the flush saw a non-empty channel, the next message was not a record, and the records sat unsent until the receiver cut the job as stalled (CI-only flake; 7/36 under local parallel load, 0/48 after). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(validate): run the C interop tests serially in make ci too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(ava1): a resumed file goes in one-group pieces so a flapping link still makes progress With kills every 2 s, the 4 MiB tail piece was cut before it was durable on every attempt and the upload retried the same 28 MiB mark until it timed out (1 in 3 locally, CI coverage). Resumed files now send 1 MiB pieces: 5/5 in ~6 s. Also: make docker-engine uses the repo root as context (as CI); governor classification asserts are skipped under the sanitizers, where the C is the bottleneck. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(test): single-instance gate tests hold the C-server lock; relay test cap leaves margin Coverage runs the C tests in parallel; the two gate tests stop the one global C server. The relay order test's 4 MiB/s cap finished in 5.9 s on CI against its >6 s precondition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(test): periodic-kill bound widened under coverage; tiny-file floor relaxed on CI runners Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(test): lane-kill test kills until a resend; periodic-kill liveness race skipped under coverage Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(test): a hung relay fails its test at the bound instead of hanging the CI job The dest-ends relay test ran the relay under spawn_blocking: on a hang the timeout panicked but the runtime then waited forever for the blocking thread (27 min on CI). It now runs on a plain thread. The engine test steps get a 25-minute bound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(test): dest-ends relay test in its own binary on small files; relay logs its silent retries The test hung a CI job twice inside the shared relay binary (behind the 384 MiB relays' lock) and never reproduced locally or in Linux Docker. It now runs alone, on 4x32 MiB (still twice the relay buffer), ~3 s. The relay's open-dropped and retry paths now say so on stderr instead of looping silently. Governor classification asserts also skip under coverage, where the instrumented sender is the bottleneck. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(test): the partly-durable relay test caps its first attempt so it can be interrupted On a fast runner the uncapped relay finished all 160 MiB before the first durable report was observed. The first attempt now reads A through a 32 MiB/s proxy (~5 s); the resume runs uncapped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * feat: one-time 6.0 upgrade clean-up that keeps every setting Host (engine, once per data dir): pre-5.x files no 5.41/6.0 code reads (api_token, ps5upload.ini, ps5upload_profiles.ini/.json, app-config.json) move to ~/.ps5upload/legacy-5x/. App (desktop, once): the 1.x/2.x config.json/profiles.json move to legacy-5x/; the cached ezremote-dpi.elf nothing loads is deleted. Client: the retired upload-streams key is dropped. Console (once per console, on its first 6.0 helper answer): the FTX2 /data/ps5upload/tx and /spool folders are deleted; a failure retries later. The health check no longer lists those folders (its fix would have recreated them). Nothing current is moved or reset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(test): the download periodic-kill race is skipped under coverage, like its upload twin Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(test): the tiny-zip floor only catches a stall on CI runners Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(test): 'other calls still answer during launches' is a state check, not a wall-clock bound Both mgmt_t6 tests asserted a sub-300 ms answer while a slow Sony call ran; on a loaded runner that separates nothing. They now assert the answer arrived while the slow call was still in flight. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff * fix(ci): reword the 6.0 migration comments for check-no-ftx2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XR8fQMhp7Rdgq2e4U9oDff --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
4.9 KiB
Payload
The C payload that runs on the PS5. Built with the
PS5 Payload SDK (version pinned
in ../scripts/ps5-sdk.env), sent to the
console's ELF loader, and left resident until reboot or rest mode.
It listens on one port, 9120, for AVA1 (protocol/ava1/SPEC.md):
transfers, status, filesystem, mount, app, hardware, package and shell
calls all travel over one encrypted session with up to 8 data lanes.
Layout
src/main.c handles startup: credential elevation, runtime ownership,
the takeover, the one-time removal of the retired transfer folders
(src/state_migrate.c), starting the AVA1 server, and cleanup. It binds no
socket of its own. src/runtime.c holds the management handlers the AVA1
table (src/mgmt_table.def, dispatched by src/mgmt_rpc.c) calls, and the
instance lifecycle (ownership record, reap, shutdown). ava1/ is the AVA1 protocol in C (frames,
generated codecs in ava1/gen/, Noise handshake, server); never edit
ava1/gen/ by hand. src/takeover.c
asks an older resident payload to stand down before binding.
The rest of src/ is one module per capability: registration and launch,
package install, hardware and sensors, processes, profiles, saves and
backup, cheats, FTP, remote play, fan curve, notifications, system
registry and time, firmware spoofing, and the SDK version changer.
installer/ builds our own standalone install daemon
(ps5upload-installer.elf, TCP :9115) used for package installs on newer
firmware. It loads as a companion image on the :9021 loader (never evicting
the helper), self-escalates, and answers a JSON-lines protocol
(hello/install/job/stop); for a staged file it serves the package to
Sony's installer over a 127.0.0.1 HTTP URL. The engine sends it automatically
when nothing is listening on :9115.
Prior art
The installer daemon is our own implementation. Its design was informed, as behavioural references only (no code or names are carried into the daemon), by cy33hc's ps5-ezremote-dpi, etaHEN and elf-arsenal's DPI payloads, and itsPLK's on-console PKG Manager (the loopback-serving + cacheability rules).
Build
export PS5_PAYLOAD_SDK=/opt/ps5-payload-sdk
make -C .. payload # → payload/ps5upload.elf (+ .gz)
make -C .. send-payload PS5_HOST=<ip>
Everything compiles with -Wall -Wextra -Werror.
Testing
Logic that can be separated from the console lives in a header under
include/ and gets a host-compiled self-test in tests/, run by
make test-payload with the same warning flags.
See tests/*_selftest.c for the full list (hardware guards, ptrace recovery, app.db
reading, FTP, SDK param rewriting, installer, cheats, wake watchdog and more). AVA1 itself is
tested from Rust: cargo test -p ava1-ctest -- --test-threads=1 in engine/ compiles
ava1/ on the host and checks it against the Rust side.
Prefer adding to this set over testing on hardware: a host self-test runs in milliseconds and can't wedge a console.
Things that will bite you
- Never
rename()across mounts. It panics the kernel. Guard onst_dev. - Nothing large on a thread stack. Threads that need room ask for it explicitly (512 KiB–1 MiB); the default is small. A 256 KiB buffer in an FTP handler once overflowed it and wedged consoles hard enough to need a power cycle — bulk buffers are heap-allocated now.
- Every blocking wait needs a bound. Unbounded
ptracewaits froze consoles; Sony IPC init could hang the DPI daemon. Both are now timed, and a timed-out attempt is never restarted concurrently. - JSON keys must be
snake_case, and any interpolated string must be escaped. The engine parses with serde: a wrong key silently yields a default value, and one bad byte rejects the entire response. - Some Sony libraries simply aren't on the console.
libSceSqlite.sprxis absent under every lib path, sodlsym(RTLD_DEFAULT, "sqlite3_*")fails on every firmware — not just some. Degrade honestly instead of blaming the firmware. - "The platform doesn't ship it" is not "we can't have it." That
SQLite conclusion was right about Sony and wrong about us: a static
library is just more of our own
.text. The payload now links its own SQLite (content_db.c, built from the amalgamation thatscripts/install-ps5-sdk.shfetches). Two full SQL implementations had been sitting behind that deaddlsymprobe long enough to drift apart and hardcode different table names, and a third — inregister.c— was a table of function pointers that nothing ever assigned. A branch that can never execute is where bugs go to hide, so prefer deleting it to keeping it as a fallback that never fires. - Check what a database says its schema is.
content_db.cfinds the app table throughsqlite_masterandPRAGMA table_inforather than naming it, because the two dead implementations disagreed about the name and there was no way to tell which was right.