feat(libSceLibreSsl): implement memory BIOs #9536
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9536"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Felipebmaitan on 2026-10-22T00:43:54Z.
What
Memory BIO methods and callbacks. Refreshed published history onto fetched main
b28bb772177768f99874ca38f6252cd0139acf2a. #9535 is merged; its numeric ERR behavior, shared queue and test-only generator/Python/submodule setup remain unchanged. No replacement PR, force push or unrelated branch changes.Resolved the pending-export debt conflict by independently recounting the merged
Export.cpp: 254 literalNotImplemented_nid_no_patch(__func__)calls, matching direct exported stub bodies. Published runtime implementations and supported fixtures are byte-identical to the previous head; the removed BIO ex-data throw/reference assertion remains absent and production refusal stays intact.Tested
Exact head
242c41111435bd5d02a55d17acb54ea35146a3c8, integrated mainb28bb772177768f99874ca38f6252cd0139acf2a. Ubuntu amd64 Docker on Apple Silicon; GCC 13.3.0, CMake 3.28.3, Ninja, Python 3.12.3, Release. Native below means unpatched symbols, not execution on native Linux hardware.44af6828fdc064ca16f94aeb07ac913651d2bfce0f5ecbeee6b9b476e6be24e3; three lifecycle cases pass again. Runtime graphs exclude the generator and compile the shared queue once.python3 tools/check_conventions.py --base origin/mainand whitespace pass in isolated Git contexts pinningorigin/mainto the integrated SHA above, without changing shared tracking refs.Docker denies userfaultfd, so libc uses its existing comparison fallback. No new local Windows/macOS runtime, sanitizer, commercial-title or physical-console run; Hosted CI on
242c41111435bd5d02a55d17acb54ea35146a3c8:windows,conventions,library-portability,eligibility,labelsandreportsucceeded.linux,relinker,relinker-asan,register-context,write-watchandedge-watchwere skipped; earlier conventions attempts were cancelled. GitHub reports CLEAN / MERGEABLE; skipped jobs are not claimed as executed. Current-head maintainer re-review remains pending. Previous hosted results and bounded growth-wipe/no-Python fragment controls remain historical. Firmware-module comparison evidence remains attributed PC execution with stand-in imports, not console evidence. No success is claimed for skipped or pending jobs.Formal re-review requests to GitHub returned HTTP 404 for this PR; no reviewer request was registered. The validation reply explicitly asks @MarcZX10 to re-review. This API failure is separate from the validated code fixes and completed hosted CI.
Readiness: the stale
needs rebaselabel has cleared. Formal re-review requests returned HTTP 404 and no reviewer request is registered. MarcZX10 was explicitly asked in the validation reply, but the historical change request remains a review-queue blocker until a formal re-request is registered or the review state is updated.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T00:55:44Z.
Review: COMMENTED
I reviewed the BIO implementation against the pinned LibreSSL 3.4.1
bss_mem.c,bio_lib.candbuffer.cbehavior, including buffer ownership, close/reset controls, EOF/retry, method dispatch, callbacks, reference release and growth limits. The focused tests cover the main transfer/ownership/error paths, failure injection, callback order and 64-bit guest ABI. I did not find an additional BIO-specific blocker in this pass.This stack depends on #9535, where I requested a fix for
ERR_free_stringsfollowed byERR_load_crypto_stringsremaining permanently in the freed state. Please revalidate the integrated stack after that fix; I’m not treating this comment as approval. The PR reports the Windows full-suite and 7/7 LibreSSL/patched-library selection, with baseline failures and the temporary #8310 fixture overlay disclosed; I did not rerun a local build. Current hosted eligibility, conventions, intake, labels and report checks pass; product jobs are skipped.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T01:01:46Z.
Review: APPROVED
I rechecked the BIO implementation against the pinned LibreSSL 3.4.1 memory BIO behavior and verified the parent stack update on #9535. The PR declares Depends on #9535, which in turn depends on #9529; no order/overlap issue remains in the declared stack. Tests are extensively reported, with the 5 full-suite failures and platform limits disclosed; hosted eligibility, conventions, intake, labels and report checks pass, while product builds were skipped. I found no additional blocking issue in the reviewed diff.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T01:05:00Z.
Review: COMMENTED
My approval reflects the reviewed BIO diff and its declared #9535 → #9529 dependency stack. Note that #9535 has an earlier change-request review which I corrected and then approved after verifying the pinned LibreSSL contract; GitHub shows the approval as its latest review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T01:08:38Z.
Review: APPROVED
The reviewed memory BIO implementation matches the pinned LibreSSL 3.4.1 behavior; the declared dependency chain #9536 → #9535 → #9529 is consistent. My earlier #9535 lifecycle request was corrected after source verification, and the updated ERR change is approved. The author reports focused and full-suite testing with failures disclosed; current eligibility, conventions, intake, labels and report checks pass, while product jobs are skipped. I found no blocking issue in this diff.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T02:00:22Z.
Review: APPROVED
Rechecked the unchanged BIO implementation at its current head. Its memory BIO behaviors and ABI follow the pinned LibreSSL 3.4.1 sources, and the PR declares the current ERR/#9529 dependency chain. The focused tests and extensive full-suite/baseline failure accounting are author-reported; required hosted policy checks pass and product/relinker jobs were skipped. I did not run local tests.
Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-22T04:38:52Z.
Review: COMMENTED
Linux run, since the description says Linux/macOS were not run, plus one gap in the wiping coverage.
Machine: Linux x86_64, i7-8700, Ubuntu 26.04 (kernel 7.0.0-38), GCC 15.2, Release,
BUILD_TESTING=ON. Head0b6880e4dmerged--no-commitontomainab347d144(clean).git submodule update --initchecked out3rdparty/libressl-openbsdat078b3d1df.guest_libressl_bio,guest_libressl_bio_patched,guest_libressl_error,guest_libressl_errors,guest_libressl_free_strings,guest_libressl_free_strings_firstandpatched_libraries.bio->flags |= RetryReadfromreadMemoryabortsguest_libressl_biowithempty writable BIO retry, so the retry and EOF paths are covered.clearBuffer(buffer)beforefree_nid_postfix(buffer.data)in the growth branch ofwriteMemorystill passesguest_libressl_bio. The test armswipePointeronly beforeBIO_free, so the buffer a growing write frees (abcat capacity 8, when the second write grows it to 20) is never checked. LibreSSL wipes there too:mem_write→BUF_MEM_grow_clean→recallocarray(str->data, str->max, n, 1)(buffer.c:121in the pinned submodule), which clears the old allocation before it frees it. SettingwipePointer/wipeSizeto the oldbuffer->data/capacitybefore the second write and then requiringwipePointer == nullptrcovers it: I tried it here, and it passes with the PR and aborts withfreed buffer was not wipedonce the growthclearBufferis removed.Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T11:35:59Z.
Review: CHANGES_REQUESTED
The implementation currently wipes the old owned buffer before freeing it during growth, and again before destruction. The regression only arms
wipePointerimmediately beforeBIO_free, so it does not verify the growth path: removing theclearBuffer(buffer)immediately beforefree_nid_postfix(buffer.data)inwriteMemorywould still pass the submitted test. Please add an assertion around a growth-triggering write that records the old allocation/capacity and verifies those bytes are zero when that allocation is released. This matters because the PR explicitly claims secure clearing of owned storage. Also, this head is 4 ahead / 119 behind currentmain(merge basea6dcea927); please refresh it and rerun the focused BIO suite, conventions and test-registration checks. I did not run a local C++ build in this pass; the Linux focused test/control described by the other reviewer is independently reported, not my run.