Repository navigation
Conversation
Progress report (6c1efc7 → 92efe81)📈 System libraries: 31.61% (+0.04%, +14 implemented functions) ✅ 14 implemented
Changed libraries (implemented exports)
|
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
BunnyFl
left a comment
There was a problem hiding this comment.
Looks right, and the layouts match the PS5 module, not only LibreSSL 4.0.0.
Firmware 13.42's system/common/lib/libSceLibreSsl3.sprx (sha256 ee2c529c87fe21b7ef1e5f13d10c47ee90944f52a1f848fe0995e031817c2c3a), disassembly only:
| Export | 13.42 | This PR |
|---|---|---|
BIO_meth_new (0x59d60) |
calloc(1, 0x50) |
80-byte method, calloc_nid_postfix(1, …) |
BIO_meth_free (0x59d90) |
tail call to free |
free_nid_postfix |
BIO_meth_set_write/read/ctrl/create/destroy |
store at +0x10/+0x18/+0x30/+0x38/+0x40, return 1 |
write/read/control/create/destroy at the same offsets, return 1 |
BIO_set_init (0x5c410) |
mov [rdi+0x20], esi |
initialized at 0x20 |
BIO_get_shutdown/set_shutdown |
[rdi+0x24] |
shutdown at 0x24 |
BIO_set_flags/clear_flags |
or [rdi+0x28], esi / and [rdi+0x28], ~esi |
flags at 0x28 |
BIO_get_data/set_data (0x5c3e0/0x5c3f0) |
[rdi+0x38] |
data at 0x38 |
None of the 13.42 accessors checks for null, so throwing on a null object is the documented divergence from a fault, as the entry says.
Tested on Windows 11, WinLibs GCC 15.2.0, Release, with head 10cc291ea8 merged onto main: guest_libressl3_bio, public_headers and check_conventions.py --base upstream/main pass.
Non-blocking: the debt entry says the console layout is unverified. The table above settles the offsets these 14 exports touch for 13.42, so that part could be narrowed to what's still open (construction, chaining, I/O, and the bridge from the older libSceLibreSsl BIOs).
|
@BunnyFl thanks for checking this against 13.42, that's really useful. I've narrowed the debt entry in |
|
@EagleBearerYS I rechecked #12945 against this branch. The textual merge preview is clean, but both branches define I've added The description also now reflects BunnyFl's firmware 13.42 disassembly review and the debt update in |
|
@Noxy-HNR thanks for checking, and that order works for us. #12945's |
|
@oneandonlydean @BunnyFl the latest Windows job failed in I checked this locally on Windows 11, WinLibs GCC 15.2.0, Release:
I have not reproduced the hosted filesystem failure, so I am leaving it recorded as unresolved rather than attributing a cause. My attempt to rerun the failed job was denied for lack of repository rights. Could a maintainer rerun the failed Windows job, or investigate it on the runner if it repeats? |
There was a problem hiding this comment.
Edited 2026-11-05: corrected. The first version of this review said guest_filesystem had passed 25 repeated runs alone and 15 in parallel on main; those runs left no log, so that line is removed and the repeats were redone below. It also misdescribed the hosted log (more output follows the junctions, quoted below), and it called the hosted abort "runner-side or flaky" without having tested any cause. I don't know what caused it.
Re-approving at 4300582b7f. From 10cc291ea8 (my first review) to 4300582b7f, git diff --stat shows one changed line, in docs/dev/debt/libSceLibreSsl3.md. Its new wording matches what the 13.42 disassembly showed: method size 0x50 through calloc, and the offsets of the five setters and seven accessors.
Run on 2026-11-02, Windows 11, WinLibs GCC 15.2.0, head 4300582b7f merged onto main a4eca2a056: guest_libressl3_bio, public_headers and guest_filesystem passed, one run each.
Rerun on 2026-11-05 at the current head ba5711574d merged onto main 6a337633c6, Windows 11 Pro 10.0.26300, WinLibs GCC, Release, with guest_libressl3_bio_tests and guest_filesystem_tests rebuilt before each run:
guest_libressl3_bio,public_headersandguest_filesystempass, one run each.guest_filesystemwithctest --repeat until-fail:25: 25 of 25 pass on the merge, and 25 of 25 onmain6a337633c6.
The hosted abort (job 125404179173 of run 41482291203, head 4300582b7f): guest_filesystem exits with 0xc0000409. These are the log's last lines before the abort:
Junction created for anyps5-filesystem-test-2211850804800\junction-full <<===>> anyps5-filesystem-test-2211850804800\junction-full-target
[src/Open.cpp:345 sceKernelOpen] path=anyps5-filesystem-test-2211850804800\present.txt flags=0x0 nativeFlags=0x8000 mode=00
... (24 more sceKernelOpen lines on present.txt, missing.txt and the test directory)
[src/Open.cpp:345 sceKernelOpen] path=/ flags=0x20000 nativeFlags=0x8000 mode=00
[src/Open.cpp:345 sceKernelOpen] path=. flags=0x20000 nativeFlags=0x8000 mode=00
FATAL: abort() (SIGABRT) on thread 3628
I haven't reproduced it on this machine in the runs above.
AI-assisted: yes (Claude Code)
BunnyFl's firmware 13.42 disassembly in review matches the method size, allocation and every offset the 14 exports touch, so only other firmware and BIO construction, chaining and I/O remain open.
4300582 to
ba57115
Compare
|
Rebased onto Windows 11, WinLibs GCC 15.2.0, Release: rebuilt the relevant targets and passed 7/7 tests (BIO, both ASN.1 decoders, the allocator case, stack, time and filesystem). The public-header audit passes for 405 libraries / 27,952 exports. Current conventions, whitespace and the current-main merge preview pass. The description also now records the successful hosted rerun at the previous head, rather than calling it pending. Could a maintainer review the rebase and start a fresh full Build run on The agreed order after #14889 and #12945 remains unchanged. I rechecked #12945 at |
# Conflicts: # docs/dev/debt/libSceLibreSsl3.md
# Conflicts: # docs/dev/debt/libSceLibreSsl3.md
|
Hi @Noxy-HNR, thanks for merging main. We merged the latest main on top (merge commit 6e2564e) after #15303 landed. The conflicts were all in stub blocks: your BIO implementations in |
|
Hi @Noxy-HNR, thanks for this. Pull request #14889 landed on main, so we merged current main into your branch again (merge commit 9baeb82); you don't need to do anything. The conflicts were adjacent stub entries: the stubs both sides had implemented ( |
|
Hi @Noxy-HNR, Main moved again (#15449 changed the same LibreSsl3 debt count), so we merged current main into your branch once more (92efe81). The count is recounted from the merged code: 126 = 116 named + 10 NID-only. Your code is otherwise unchanged; the 36 LibreSsl3 tests pass locally, and Windows CI is running again on the new head. Thanks for your patience. |
|
Hi @Noxy-HNR, thanks for the BIO_meth_* work. One change before this can merge: could you drop the seven BIO field accessors (BIO_get_data, BIO_set_data, BIO_set_init, BIO_get_shutdown, BIO_set_shutdown, BIO_set_flags and BIO_clear_flags) and keep the BIO_meth_* functions? The accessors read and write the fields at the LibreSSL 4.0.0 offsets from your Pull request #15760 implements the same seven accessors on libSceLibreSsl's layout, so nothing is lost by removing them here. |
What
Implement 14 newly named LibreSSL3 BIO exports: method allocation/free, write/read/control/create/destroy callback installation, and data/init/shutdown/flag accessors.
The 80-byte method and 112-byte BIO layouts follow LibreSSL 4.0.0 bio_local.h, with behavior from bio_meth.c and bio_lib.c. Methods use the application heap and borrow their names. Callback pointers retain the guest System V ABI, and control arguments/results use 64-bit guest
longon Windows. Null objects that upstream dereferences throw.This supplies the method/field API, without implementing BIO construction, chaining or network I/O. BunnyFl's firmware 13.42 disassembly review confirms the method size/allocation and the field offsets these 14 exports touch. Other firmware and complete construction, chaining and I/O remain unverified; older libSceLibreSsl BIO objects require a bridge before use with these layouts. These limits are recorded in the library's debt file; no title unblock is claimed.
Tested
Current-head verification (
6aa57fb3d42b700347cfda91768bbd45ab536e82): merged upstream main9b0fdbfb24, preserving maintainer merge6e2564e106. Only the debt inventory needed manual resolution: 131 remaining stubs (121 named, 10 unknown); BIO implementation, layout header and tests are unchanged. Windows x86-64, WinLibs GCC 15.2.0/Ninja, Release, full configuration (BUILD_TESTING=ON, relinker-only OFF): focusedguest_libressl3_bio_teststarget built with-j 18;guest_libressl3_biopassed three runs. Conventions and whitespace checks pass. Independent different-model static and validation-log review found no substantive issues. Fresh automatic Build run is queued for this exact head; no hosted pass is claimed. Full-build dispatch was attempted and rejected with HTTP 403 (admin rights required), so maintainer dispatch is pending. No full suite, Linux, console or title run was performed for this head.Historical local verification (
cefbec3c32): merged mainad8e79fd81without force-pushing. Only the debt document required manual resolution; the BIO implementation, layout header and regression test are unchanged. The remaining-export inventory matches 146 rows (136 named and 10 unknown), retaining main's three session-metadata removals. Windows 11 x86-64, WinLibs GCC 15.2.0/Ninja, Release,-j 18: BIO, ASN.1, ASN.1 string, key reference, stack, time and session-metadata CTests all passed in each of three runs. Current conventions and whitespace checks pass. New hosted checks are running.Historical local verification (
d7ba0ad6e3): merged main6beaeef052without force-pushing; the only manual conflict resolution was the debt inventory. The BIO implementation, layout header and regression test are unchanged. Windows 11 x86-64, WinLibs GCC 15.2.0/Ninja, Release,-j 18: rebuilt the real module and six related targets; BIO, ASN.1, ASN.1 string, key reference, stack and time CTests all passed in each of three runs. Conventions and whitespace checks pass. Current-head hosted checks are pending.Historical hosted verification (
a94dbfe749): the Windows changed-test job passed;guest_libressl3_bio, ASN.1, stack and time tests passed. The job reports zero failures among 3,337 selected CTest entries, including skipped entries. Its log identifies this exact PR head. This is not a fresh full Linux run; earlier local and Linux results below retain their stated commits and scope.Latest rebase verification on November 2 (
ba5711574d, based onmainatf6232fcfda): resolved the debt conflict while retaining main's new time entry and the attributed firmware 13.42 evidence. The BIO implementation, layout header and test source are byte-for-byte unchanged from4300582b7f. Windows 11 x86-64, WinLibs GCC 15.2.0, Release: rebuilt BIO, ASN.1, allocator, stack, time and filesystem targets; 7/7 focused tests passed (guest_libressl3_bio,guest_libressl3_asn1,guest_libressl_asn1,guest_libressl_asn1_allocator,guest_libressl3_stack,guest_libressl3_time,guest_filesystem). The public-header audit passes for 405 libraries / 27,952 exports; current conventions, whitespace and the current-main merge preview pass. The automatic Windows job subsequently passed on this head: 2,074 tests executed and passed, 959 skipped, zero failures across 3,033 selected CTest entries. BIO, both ASN.1 decoders, the allocator case, stack, time and filesystem all ran and passed. This is a changed-test workflow, not the separate full build requested in the follow-up. At that historical run, #14889 and #12945 were open. #12945 has since merged; #14889 remains the declared integration prerequisite.Prior verification on November 2: Windows 11 x86-64, WinLibs MinGW GCC 15.2.0, Release. Rebuilt the BIO, ASN.1, stack and filesystem targets on
4300582b7f: 4/4 passed. The same four tests pass on a clean local merge withmainatb28bb77217(tree274bbd6f9973a8202acbd8aeb6887b7bad85d294). Clean main's filesystem test also passes.The earlier hosted Windows job failed only
guest_filesystemamong 2,936 selected tests (exit0xc0000409); BIO passed. After the PR was closed and reopened, the fresh Windows job passed at the previous head,4300582b7f. The original failure was not reproduced or attributed to a specific cause. BunnyFl's re-approval applies to that previous head and reports passing BIO, public-header and filesystem checks. The rebased head still needs fresh hosted verification; the current local results are above.Original verification:
Windows 11 x86-64, WinLibs MinGW GCC 15.2.0, Release, on an independent branch from upstream
0580e5c951withBUILD_TESTING=ON. The ASN.1 value contribution was absent from this build.Built
guest_libressl3_bio_tests,guest_libressl3_asn1_testsandguest_libressl3_stack_teststhrough CMake.ctest --test-dir <build> -R '^guest_libressl3_(bio|stack|asn1)$' --output-on-failure: 3/3 passed.The new runtime test installs and calls guest write/read/control/create/destroy callbacks, transfers binary data, and checks a control value/result wider than 32 bits. It checks zero initialization, null callback replacement, borrowed names, allocation failure, exact field writes with surrounding guards, signed int values/flag masks and null-object exceptions. Method free does not invoke callbacks.
python core/libs/tests/test_public_headers.py --audit-only: 399 libraries / 26,743 exports passed.python tools/check_conventions.py --base origin/mainandgit diff --check: passed.nid_patchersuccessfully patched a copy of the resulting PRX with the libc export-preservation option.Historical head
ba5711574dis rebased ontof6232fcfdaand merges cleanly with that main. The conflict resolution changes debt text only; no BIO implementation, layout or test behavior changed. The older results below retain their measured bases; hosted results are not being carried forward as validation of the new head.No Linux, console or retail-title runtime test was performed. The full project build/test suite was not run.
tools/pr_overlap.py --repo boykopovar/AnyPS5 --base main --branch HEADwas rerun against 1,778 open PRs. It returned exit 2 because several other heads conflict with main, so this is not an automatic overlap pass. Shared declarations, build registrations and debt diffs were inspected manually for #10461, #10631, #10960, #11146, #12754, #13486, #14212, #14483, #14499, #14612, #14992, #15031, #15045 and #15119, along with the adjacent-edit findings. No other implementation of these 14 exports was found; the report also compares this local rebase against this PR's own previous head. Other PRs still touch shared debt/build/declaration files, so integration may require another rebase as those land. Companion #14889 implements a separate ASN.1 API. The two new heads still conflict inAdditionalExports.cppandApi.hpp, so #14889 remains first and this BIO PR must be rebased afterward. There is no runtime dependency between those features.#12945 (
BIO_up_ref) is now merged into main and included here. This branch reuses the single 112-byteLibreSsl3Biodeclaration ininclude/Key.hpp;include/Bio.hppincludes it and only defines the method/callback types and field assertions. The duplicate-layout integration work is complete, and the refreshed key-reference and BIO tests pass. #14889 remains the declared integration-order prerequisite.Checklist
Based on current
main; no other open PR implements the same functionsOne topic per PR; follow-ups go in a new PR
No comments in code except technical debt
Unimplemented paths throw (
NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt fileNo notes, investigation
.mdfiles or images added to the repository (attach them to this PR)New third-party code is a submodule built from source
Generic behaviour, not specific to one title
Depends on: feat(libSceLibreSsl3): implement ASN.1 value mutation and octet lifetime #14889
Fixes: none
Unblocks: none
GPUs tested: n/a
AI-assisted: yes