Skip to content

feat(libSceLibreSsl): implement memory BIOs - #9536

Merged
9 commits merged into
boykopovar:mainfrom
Felipebmaitan:feat/libressl-memory-bio
Nov 3, 2026
Merged

9 commits merged into
boykopovar:mainfrom
Felipebmaitan:feat/libressl-memory-bio

Conversation

@Felipebmaitan

@Felipebmaitan Felipebmaitan commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

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 literal NotImplemented_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 main b28bb772177768f99874ca38f6252cd0139acf2a. 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.

  • 46/46 native + 2/2 patched focused CTests pass, including ERR queue/numeric/load/free, BIO callbacks/null/zero/retry/errors/nonzero-slack full-capacity growth and destruction wiping, available CMAC/BN cases, and current main's LibreSSL/LibreSSL3 regressions, including new EVP and version cases.
  • Fresh initially empty source-built component build for BIO, reconfigured/rebuilt for CMAC. Actual libc/libkernel/LibreSSL/LibreSSL3 and repository NID patcher; pinned mbedTLS/ZArchive/zstd built from source. Separate native/patched loader paths. External harness imports actual repository library/test fragments; this is not a full root/product build.
  • ERR generated fixture deletion: runtime libraries build with it absent; formatter target regenerates it with unchanged SHA256 44af6828fdc064ca16f94aeb07ac913651d2bfce0f5ecbeee6b9b476e6be24e3; three lifecycle cases pass again. Runtime graphs exclude the generator and compile the shared queue once.
  • Header audit: 399 libraries / 27,365 exports, canonical unique declarations and umbrella coverage; strict standalone Clang compilation targeting x86-64 macOS passes (compile-only). All 41 scoped test executables are registered. Exact old/main public-definition/NID union and main runtime implementations are retained; counts and registrations independently audited.
  • python3 tools/check_conventions.py --base origin/main and whitespace pass in isolated Git contexts pinning origin/main to the integrated SHA above, without changing shared tracking refs.
  • Overlap scans completed with exit 2, reporting adjacent/source-list/debt conflicts, inherited BIO code and incomplete comparisons. Reported shared-file/function inventories were reviewed. feat(libSceLibreSsl): implement file and socket BIO adapters #12928 inherits BIO and explicitly depends on feat(libSceLibreSsl): implement memory BIOs #9536; feat(libSceLibreSsl): implement the BN_ BIGNUM, BN_CTX, conversion, word, BN_mul and BN_mod_inverse functions #9446's BN work remains preserved in CMAC. The full output and unresolved comparisons are in the latest validation reply; no clean-overlap or external-order agreement is claimed.

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, labels and report succeeded. linux, relinker, relinker-asan, register-context, write-watch and edge-watch were 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 rebase label 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

  • Based on current main; no other open PR implements the same functions
  • One 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 file
  • No notes, investigation .md files 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: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Progress report (b28bb77 → 242c411)

📈 System libraries: 26.77% (+0.02%, +11 implemented, +2 declared functions)

✅ 11 implemented
Library Name
libSceLibreSsl BIO_ctrl_nid_postfix
libSceLibreSsl BIO_new_mem_buf_nid_postfix
libSceLibreSsl BIO_new_nid_postfix
libSceLibreSsl BIO_puts_nid_postfix
libSceLibreSsl BIO_s_mem_nid_postfix
libSceLibreSsl BIO_write_nid_postfix
libSceLibreSsl controlMemory
libSceLibreSsl createMemory
libSceLibreSsl destroyMemory
libSceLibreSsl getsMemory
libSceLibreSsl readMemory
🆕 2 declared as stubs
Library Name
libSceLibreSsl putsMemory
libSceLibreSsl writeMemory

Changed libraries (implemented exports)

Library Before After Change
libSceLibreSsl 132/411 (32.12%) 143/418 (34.21%) +2.09%

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the BIO implementation against the pinned LibreSSL 3.4.1 bss_mem.c, bio_lib.c and buffer.c behavior, 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_strings followed by ERR_load_crypto_strings remaining 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.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 5021 core/libs/CMakeLists.txt
PR 7275 core/libs/CMakeLists.txt
PR 7622 core/libs/CMakeLists.txt
PR 7645 core/libs/CMakeLists.txt
PR 8650 core/libs/CMakeLists.txt
PR 9019 core/libs/CMakeLists.txt
PR 9156 core/libs/CMakeLists.txt
PR 9161 core/libs/CMakeLists.txt
PR 9162 core/libs/CMakeLists.txt
PR 9293 core/libs/CMakeLists.txt
PR 9297 core/libs/CMakeLists.txt
PR 9302 core/libs/CMakeLists.txt
PR 9383 core/libs/CMakeLists.txt
PR 9446 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9537 core/libs/CMakeLists.txt
PR 9933 core/libs/CMakeLists.txt
PR 10395 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10418 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10508 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10570 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10834 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10878 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10915 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11003 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11128 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11146 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11151 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11174 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11175 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11466 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11553 docs/dev/debt/libSceLibreSsl.md
PR 11662 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 12130 core/libs/CMakeLists.txt
PR 12642 core/libs/CMakeLists.txt
PR 12778 core/libs/CMakeLists.txt
PR 12994 core/libs/CMakeLists.txt
PR 13194 core/libs/CMakeLists.txt
PR 13206 core/libs/CMakeLists.txt
PR 13253 core/libs/CMakeLists.txt
PR 13255 core/libs/CMakeLists.txt
PR 13256 core/libs/CMakeLists.txt
PR 13730 core/libs/CMakeLists.txt
PR 13814 core/libs/CMakeLists.txt
PR 13860 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 13978 core/libs/CMakeLists.txt
PR 14015 core/libs/CMakeLists.txt
PR 14086 core/libs/CMakeLists.txt
PR 14115 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 14145 core/libs/CMakeLists.txt
PR 14193 docs/dev/debt/libSceLibreSsl.md
PR 14212 docs/dev/debt/libSceLibreSsl.md
PR 14213 core/libs/CMakeLists.txt
PR 14216 core/libs/CMakeLists.txt
PR 14246 core/libs/CMakeLists.txt
PR 14257 core/libs/CMakeLists.txt
PR 14264 core/libs/CMakeLists.txt
PR 14299 core/libs/CMakeLists.txt
PR 14304 core/libs/CMakeLists.txt
PR 14328 core/libs/CMakeLists.txt
PR 14405 core/libs/CMakeLists.txt
PR 14406 core/libs/CMakeLists.txt
PR 14429 core/libs/CMakeLists.txt
PR 14717 docs/dev/debt/libSceLibreSsl.md
PR 14798 core/libs/CMakeLists.txt
PR 15061 core/libs/CMakeLists.txt
PR 15111 core/libs/CMakeLists.txt

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jotitadev jotitadev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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. Head 0b6880e4d merged --no-commit onto main ab347d144 (clean). git submodule update --init checked out 3rdparty/libressl-openbsd at 078b3d1df.

  • Build ok. The seven tests pass: guest_libressl_bio, guest_libressl_bio_patched, guest_libressl_error, guest_libressl_errors, guest_libressl_free_strings, guest_libressl_free_strings_first and patched_libraries.
  • Red→green: removing bio->flags |= RetryRead from readMemory aborts guest_libressl_bio with empty writable BIO retry, so the retry and EOF paths are covered.
  • Gap: removing the clearBuffer(buffer) before free_nid_postfix(buffer.data) in the growth branch of writeMemory still passes guest_libressl_bio. The test arms wipePointer only before BIO_free, so the buffer a growing write frees (abc at 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:121 in the pinned submodule), which clears the old allocation before it frees it. Setting wipePointer/wipeSize to the old buffer->data/capacity before the second write and then requiring wipePointer == nullptr covers it: I tried it here, and it passes with the PR and aborts with freed buffer was not wiped once the growth clearBuffer is removed.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation currently wipes the old owned buffer before freeing it during growth, and again before destruction. The regression only arms wipePointer immediately before BIO_free, so it does not verify the growth path: removing the clearBuffer(buffer) immediately before free_nid_postfix(buffer.data) in writeMemory would 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 current main (merge base a6dcea927); 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.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 25, 2026
@BunnyFl

BunnyFl commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

@Felipebmaitan firmware 13.42 data for the memory BIOs ("PS5 module/version equivalence ... unverified"), plus the growth-wipe point from the reviews. I ran the decrypted libSceLibreSsl.sprx's BIO_s_mem, BIO_new, BIO_new_mem_buf, BIO_ctrl, BIO_write, BIO_puts and BIO_free, and the method table's read/gets slots, natively on a PC (not a console). They were compared against src/Bio.cpp and src/Error.cpp from 0b6880e4d0 compiled unchanged. Both sides allocated through stand-ins, and the module's blocks were pre-filled with 0xAB.

What was compared: 1,048 operation sequences, 14,708 steps. After every step both sides printed:

  • the return value;
  • the BIO fields at the PR's offsets, and the BUF_MEM length, data, max and contents;
  • the bytes read out;
  • the queued error codes;
  • the allocations and frees;
  • the callback calls.

The sequences were:

  • fixed scenarios: owned, EOF through ctrl 130, read-only with sizes 60, -1 and 0, no-close, references -1 to 3, and a callback in four return modes;
  • every ctrl command 0 to 140 except 114, plus 200, 255, 1000 and -1, with and without a pointer, on owned and read-only BIOs;
  • 600 random sequences of writes, puts, reads, gets and ctrls.

The method table matches: type 0x401, "memory buffer", the seven function slots set and callback_ctrl NULL. Three identical runs.

Differences

  1. BIO_write with a NULL source or size 0. The PR returns 0 before doing anything. The module runs the callback (0x03, then 0x83), and per the disassembly it calls the method without checking either argument.
Call Module PR
NULL source (owned or read-only) returns -1, queues 0x20FFF073 returns 0, no error, no callback
size 0, owned BIO returns 0 and clears the retry flags (0x9 → 0) returns 0, flags unchanged, no callback
size 0, read-only BIO returns -1, queues 0x20FFF07E returns 0, no error, no callback
  • All 285 sequences that differ first differ at one of these writes.
  • I reran with these writes left out of the random sequences. The only differing steps were then the 9 fixed-scenario steps that make these writes.
  1. After BIO_new, the padding at +44 and +76 still holds the allocator's 0xAB fill on the module in all 1,048 BIOs, while the PR's calloc zeroes it. Per the disassembly, the module stores the fields separately and never writes those bytes.

Everything else matches.

  • Buffer growth gives the same sizes, for example 8 bytes for a 5-byte write and 48 once 35 bytes are held.

  • Wiping: every data buffer freed was all zero at the time of the free, on both sides. That was 1,310 frees, 642 of them during BIO_write/BIO_puts, which is the growth path the reviews asked about.

  • Read-only BIOs: reads move the data pointer, reset (ctrl 1) restores it, and writes give -1 with 0x20FFF07E. BIO_new_mem_buf(src, -1) takes the strlen, and a NULL source gives NULL with 0x20FFF073.

  • EOF: ctrl 130 sets num. A read from an empty BIO returns num, and sets retry flags 0x9 when num is not 0.

  • No-close (ctrl 9 with 0): BIO_free frees only the BIO. References -1 to 3 free and return the same.

  • NULL BIO: ctrl, write and free return 0. BIO_puts returns -2 and queues 0x20FFF079.

  • Controls: copies of Bio.cpp with one change each are caught. These are:

    • the growth size + 8;
    • retry flags only for negative num;
    • read-only reset without rewinding;
    • a new BIO's num of 0, or a mem-buf num of -1;
    • gets without the newline;
    • no wipe on growth;
    • pending returning the capacity;
    • freeing at one reference;
    • the post-write callback op 0x03;
    • read-only writes without an error.
  • Not run: negative BIO_write sizes, ctrl 114 (BIO_C_SET_BUF_MEM), BIO_puts with a NULL string, BIO_new(NULL) and ex-data.

@Felipebmaitan

Copy link
Copy Markdown
Contributor Author

Addressed the firmware-PC/module report and the growth-wipe coverage request / follow-up in published head a3860a08ec0c4d3e245ab8f23a3d610c3d67b340.

BIO_write now dispatches all nonnegative writes through normal method validation, pre-callback, initialization validation, method invocation, accounting and post-callback. Owned/read-only null-source writes return -1 with 0x20FFF073; owned zero writes clear retry flags and return 0; read-only zero writes return -1 with 0x20FFF07E. Tests cover callbacks, veto/override, retry state, byte accounting, missing/uninitialized/custom methods and error ordering through native and patched exports.

The pinned 3.4.1 public guard disagrees with the measured nonnegative module dispatch; this difference is explicit in debt. Negative public lengths retain the pinned guard, and unmeasured raw negative/ex-data limits remain unchanged. The cited evidence is PC execution of modules with allocator stand-ins, not console execution. Padding zeroing is unchanged.

The growth regression records the old allocation and full capacity before growth, fills spare capacity with nonzero bytes and checks the allocation is wiped at release. Destruction wiping coverage remains. A bounded negative control removing only growth clearing failed with freed buffer was not wiped; after restoring source and rebuilding, native and patched BIO tests passed (2/2).

Reconciled main and published #9535 1704d4c00adb24a4530c464995f4feed2bc61212, preserving numeric ERR defaults, one queue, generated fixtures and unique public declarations. #9535 remains the prerequisite; #9529 is merged. The #9571 owner has been sent this head for composition.

Validation: Windows 7/7 selected CTests pass, including public headers. WSL Linux six runtime tests pass; the global public-header audit timed out at 90.10s on the mounted source tree. Affected LibreSSL/LibreSSL3 headers compile together with strict warnings on both platforms. Conventions, whitespace and Windows registration audit pass; overlap refreshed. Full hosted CI, native-filesystem Linux header audit and re-review remain pending. No full-suite, sanitizer, macOS, console or title run is claimed. The PR body contains detailed evidence and remaining stack overlaps.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 27, 2026
@Felipebmaitan

Copy link
Copy Markdown
Contributor Author

Refreshed existing stack head 07516032a788a3a3d294b00342ea7b51f502b9ff on main facac6a4c52fa6e4bfb2b77ba98cab5e449555d4. Published old heads remain ancestors and original authorship is preserved. The branch bodies now use the complete current PR template and describe the new-head results separately from historical Windows reports. No merge or replacement PR; #9465/#9399 branches and scope untouched.

Owned order: #9535 → #9536 → #9571. #9529/#11165 are merged. For #9571, #9446 remains an external prerequisite; its author has not confirmed the proposed order. Its inherited BN integration is preserved, not treated as new agreement or validation of the firmware differences reported on #9446.

Ubuntu 24.04 amd64 container through Docker on Apple Silicon; GCC 13.3.0, CMake 3.28.3, Ninja, Python 3.12.3, Release. Actual source-built libc/libkernel/LibreSSL/LibreSSL3 and pinned bundled dependencies, using the component harness below. This is not full root configuration or native Windows/macOS/console evidence. The initial CMAC build was clean; final stack heads were reconfigured/rebuilt incrementally. Docker logs userfaultfd unavailable (Operation not permitted), using libc's existing memory-comparison fallback.

Native/patched dispatch, null/zero, callbacks, retry/errors, nonzero-slack full-capacity growth and destruction-wipe assertions are unchanged from the published repairs. The control below removes only growth clearing; original production source is restored for final results. CMAC supported coverage is retained and ENGINE-refusal assertion stays removed.

Native commands set LD_LIBRARY_PATH=<build>:<build>/kernel:<build>/libressl:<build>/libressl3; patched commands set only <build>/patched. An initial mixed loader path failed patched loading, and an initial invocation began before all test executables finished linking; neither is counted as a pass. Final commands ran after the complete build and passed. No product workaround was added.

Native focused CTest output
Internal ctest changing into directory: /validation/build-cmac
Test project /validation/build-cmac
      Start  1: guest_libressl_errors
 1/29 Test  #1: guest_libressl_errors ...............   Passed    0.05 sec
      Start  2: guest_libressl_free_strings
 2/29 Test  #2: guest_libressl_free_strings .........   Passed    0.03 sec
      Start  3: guest_libressl_free_strings_first
 3/29 Test  #3: guest_libressl_free_strings_first ...   Passed    0.03 sec
      Start  4: guest_libressl_bio
 4/29 Test  #4: guest_libressl_bio ..................   Passed    0.04 sec
      Start  6: guest_libressl_x509_errors
 5/29 Test  #6: guest_libressl_x509_errors ..........   Passed    0.04 sec
      Start  7: guest_libressl_digest
 6/29 Test  #7: guest_libressl_digest ...............   Passed    0.19 sec
      Start  8: guest_libressl_asn1
 7/29 Test  #8: guest_libressl_asn1 .................   Passed    0.03 sec
      Start  9: guest_libressl_asn1_allocator
 8/29 Test  #9: guest_libressl_asn1_allocator .......   Passed    0.03 sec
      Start 10: guest_libressl_ex_data
 9/29 Test #10: guest_libressl_ex_data ..............   Passed    0.05 sec
      Start 11: guest_libressl_des
10/29 Test #11: guest_libressl_des ..................   Passed    0.03 sec
      Start 12: guest_libressl_runtime
11/29 Test #12: guest_libressl_runtime ..............   Passed    0.03 sec
      Start 13: guest_libressl_aes
12/29 Test #13: guest_libressl_aes ..................   Passed    0.03 sec
      Start 14: guest_libressl_error
13/29 Test #14: guest_libressl_error ................   Passed    0.04 sec
      Start 15: guest_libressl_ocsp
14/29 Test #15: guest_libressl_ocsp .................   Passed    0.03 sec
      Start 16: guest_libressl_stack
15/29 Test #16: guest_libressl_stack ................   Passed    0.03 sec
      Start 17: guest_libressl_ui
16/29 Test #17: guest_libressl_ui ...................   Passed    0.03 sec
      Start 18: guest_libressl_rsa
17/29 Test #18: guest_libressl_rsa ..................   Passed    0.04 sec
      Start 19: guest_libressl_x509_store_context
18/29 Test #19: guest_libressl_x509_store_context ...   Passed    0.03 sec
      Start 20: guest_libressl_pkey_type
19/29 Test #20: guest_libressl_pkey_type ............   Passed    0.03 sec
      Start 21: guest_libressl_cipher
20/29 Test #21: guest_libressl_cipher ...............   Passed    0.03 sec
      Start 22: guest_libressl_alert
21/29 Test #22: guest_libressl_alert ................   Passed    0.03 sec
      Start 23: guest_libressl_version
22/29 Test #23: guest_libressl_version ..............   Passed    0.03 sec
      Start 24: guest_libressl_crypto_locks
23/29 Test #24: guest_libressl_crypto_locks .........   Passed    0.03 sec
      Start 25: guest_libressl_object_text
24/29 Test #25: guest_libressl_object_text ..........   Passed    0.03 sec
      Start 26: guest_libressl_object_allocation
25/29 Test #26: guest_libressl_object_allocation ....   Passed    0.03 sec
      Start 27: guest_crypto_memcmp
26/29 Test #27: guest_crypto_memcmp .................   Passed    0.03 sec
      Start 28: guest_libressl3_digest
27/29 Test #28: guest_libressl3_digest ..............   Passed    0.04 sec
      Start 29: guest_libressl3_asn1
28/29 Test #29: guest_libressl3_asn1 ................   Passed    0.04 sec
      Start 30: guest_libressl3_key_reference
29/29 Test #30: guest_libressl3_key_reference .......   Passed    0.04 sec

100% tests passed, 0 tests failed out of 29

Total Test time (real) =   1.20 sec

Patched focused CTest output
Internal ctest changing into directory: /validation/build-cmac
Test project /validation/build-cmac
    Start 5: guest_libressl_bio_patched
1/1 Test #5: guest_libressl_bio_patched .......   Passed    0.05 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.08 sec

Conventions
Base origin/main: facac6a4c52fa6e4bfb2b77ba98cab5e449555d4
Head: 07516032a788a3a3d294b00342ea7b51f502b9ff
All conventions checks passed.

Whitespace
Whitespace check passed

Standalone public headers
368 libraries, 12990 exports: unique declarations and umbrella coverage verified
Standalone headers verified

Generator recovery
[0/2] Re-checking globbed directories...
[1/3] Generating prx/libSceLibreSsl/ErrorStrings.inc
[2/3] Building CXX object CMakeFiles/guest_libressl_error_string_tests.dir/src/core/libs/tests/GuestLibreSslErrors.cpp.o
[3/3] Linking CXX executable tests/guest_libressl_error_string_tests

Generator SHA256 before
44af6828fdc064ca16f94aeb07ac913651d2bfce0f5ecbeee6b9b476e6be24e3  /validation/build-cmac/prx/libSceLibreSsl/ErrorStrings.inc

Generator SHA256 after
44af6828fdc064ca16f94aeb07ac913651d2bfce0f5ecbeee6b9b476e6be24e3  /validation/build-cmac/prx/libSceLibreSsl/ErrorStrings.inc

Public definitions and NIDs
err dc81f08abdfdd79e2d3ceb39c71c8decd76b945c
libSceLibreSsl: 399 public definitions; exact old/main union and NIDs preserved
libSceLibreSsl3: 87 public definitions; exact old/main union and NIDs preserved
All main implementation sources byte-identical except preserved extended Error.cpp
bio 07516032a788a3a3d294b00342ea7b51f502b9ff
libSceLibreSsl: 399 public definitions; exact old/main union and NIDs preserved
libSceLibreSsl3: 87 public definitions; exact old/main union and NIDs preserved
All main implementation sources byte-identical except preserved extended Error.cpp
cmac 4d9fb8befe3a9d68bdb6619eff68f91d23f3d7e0
libSceLibreSsl: 399 public definitions; exact old/main union and NIDs preserved
libSceLibreSsl3: 87 public definitions; exact old/main union and NIDs preserved
All main implementation sources byte-identical except preserved extended Error.cpp

Scoped registration audit
run  guest_crypto_memcmp_tests
run  guest_libressl3_asn1_tests
run  guest_libressl3_digest_tests
run  guest_libressl3_key_reference_tests
run  guest_libressl_aes_tests
run  guest_libressl_alert_tests
run  guest_libressl_asn1_tests
run  guest_libressl_bio_patched_tests
run  guest_libressl_bio_tests
run  guest_libressl_cipher_tests
run  guest_libressl_crypto_locks_tests
run  guest_libressl_des_tests
run  guest_libressl_digest_tests
run  guest_libressl_error_string_tests
run  guest_libressl_error_tests
run  guest_libressl_ex_data_tests
run  guest_libressl_object_allocation_tests
run  guest_libressl_object_text_tests
run  guest_libressl_ocsp_tests
run  guest_libressl_pkey_type_tests
run  guest_libressl_rsa_tests
run  guest_libressl_runtime_tests
run  guest_libressl_stack_tests
run  guest_libressl_ui_tests
run  guest_libressl_version_tests
run  guest_libressl_x509_errors_tests
run  guest_libressl_x509_store_context_tests

All scoped executables are registered. This is not a full-root registration pass: the component harness omits the root registrations of nine unrelated libc fixtures, which the global checker reports as unrun (application_heap_tests, guest_allocations_oom_tests, guest_collate_tests, guest_heap_trace_info_tests, guest_libc_cnd_init_default_name_tests, guest_libc_cnd_timed_wait_tests, guest_libc_mutex_init_with_name_tests, guest_locale_tests, guest_rune_locale_tests).

Growth-only control, native
Internal ctest changing into directory: /validation/build-cmac
Test project /validation/build-cmac
    Start 4: guest_libressl_bio
1/1 Test #4: guest_libressl_bio ...............Subprocess aborted***Exception:   0.03 sec
[memory] write watch unavailable: userfaultfd failed (Operation not permitted); guest memory is compared instead
[src/HostCpu.cpp:193 operator()] host CPU VirtualApple @ 2.50GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, OS AVX state (XCR0); lacks RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEOPT, XSAVEC, SSE4A, PREFETCHW, CLZERO
freed buffer was not wiped


0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.05 sec

The following tests FAILED:
	  4 - guest_libressl_bio (Subprocess aborted)
Errors while running CTest

Growth-only control, patched
Internal ctest changing into directory: /validation/build-cmac
Test project /validation/build-cmac
    Start 5: guest_libressl_bio_patched
1/1 Test #5: guest_libressl_bio_patched .......Subprocess aborted***Exception:   0.03 sec
[memory] write watch unavailable: userfaultfd failed (Operation not permitted); guest memory is compared instead
[src/HostCpu.cpp:193 operator()] host CPU VirtualApple @ 2.50GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, OS AVX state (XCR0); lacks RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEOPT, XSAVEC, SSE4A, PREFETCHW, CLZERO
freed buffer was not wiped


0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.05 sec

The following tests FAILED:
	  5 - guest_libressl_bio_patched (Subprocess aborted)
Errors while running CTest

The control was run on the final combined #9571 head (same BIO implementation/test as #9536), with 30-second CTest limits. Both fail immediately with freed buffer was not wiped; restoring the original source and rebuilding restores the passing final native/patched results above. No changed source or test assertion was committed.

External reproduction harness

Save this outside the repository; mount the exact head at /src and this directory at /validation. Put the CMake file in /validation/harness, symlink /validation/harness/3rdparty to /src/3rdparty, and initialize the repository-pinned mbedTLS (including framework), libressl-openbsd, ZArchive and zstd submodules. Configure with cmake -S /validation/harness -B /validation/build-cmac -G Ninja -DCMAKE_BUILD_TYPE=Release -DBIO_CONTROL=OFF, build with cmake --build /validation/build-cmac -j4. The reusable build-directory name does not identify the source head; pin the checkout to the SHA above.

cmake_minimum_required(VERSION 3.20)
project(LibreSslStackValidation LANGUAGES C CXX)
enable_testing()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(LIBS_INCLUDE_DIR /src/core/libs)
set(ANYPS5_TEST_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests)
set(PATCHED_DIR ${CMAKE_BINARY_DIR}/patched)
function(add_test_executable target)
 add_executable(${target} ${ARGN})
 set_target_properties(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ANYPS5_TEST_OUTPUT_DIRECTORY})
endfunction()
function(configure_windows_unwind target)
endfunction()
function(add_asan_test_options)
endfunction()
add_compile_options(-ffunction-sections -fdata-sections)
add_link_options(-Wl,--gc-sections)
include(/src/cmake/ZArchive.cmake)
set(BUILD_TESTING OFF)
add_library(libc SHARED)
add_subdirectory(/src/core/libs/prx/libc libc)
target_include_directories(libc PRIVATE ${LIBS_INCLUDE_DIR})
target_link_options(libc PRIVATE LINKER:-z,now)
target_link_options(libc INTERFACE LINKER:--no-as-needed)
add_subdirectory(/src/core/libs/prx/libkernel kernel)
add_subdirectory(/src/core/libs/prx/libSceSsl ssl)
set(BUILD_TESTING ON)
add_subdirectory(/src/core/libs/prx/libSceLibreSsl libressl)
add_subdirectory(/src/core/libs/prx/libSceLibreSsl3 libressl3)
foreach(target libSceLibreSsl libSceLibreSsl3)
 target_link_libraries(${target} PUBLIC libc PRIVATE libkernel)
endforeach()
include(/src/core/libs/prx/libSceLibreSsl/ErrorQueue.cmake)
if(EXISTS /src/core/libs/prx/libSceLibreSsl/MemoryBio.cmake)
 include(/src/core/libs/prx/libSceLibreSsl/MemoryBio.cmake)
endif()
if(EXISTS /src/core/libs/prx/libSceLibreSsl/Cmac.cmake)
 include(/src/core/libs/prx/libSceLibreSsl/Cmac.cmake)
endif()
file(GLOB patcherSources /src/core/libs/nid/src/*.cpp)
add_executable(nid_patcher ${patcherSources})
target_include_directories(nid_patcher PRIVATE /src/core/libs/nid/include)
foreach(target libc libkernel libSceLibreSsl libSceLibreSsl3)
 set_target_properties(${target} PROPERTIES PREFIX "" SUFFIX .prx BUILD_RPATH "$ORIGIN" BUILD_WITH_INSTALL_RPATH ON INSTALL_RPATH "$ORIGIN")
 add_custom_command(OUTPUT ${PATCHED_DIR}/${target}.prx
  COMMAND ${CMAKE_COMMAND} -E make_directory ${PATCHED_DIR}
  COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${target}> ${PATCHED_DIR}/${target}.prx
  COMMAND $<TARGET_FILE:nid_patcher> ${target} ${PATCHED_DIR}/${target}.prx
  DEPENDS ${target} nid_patcher)
 list(APPEND patched ${PATCHED_DIR}/${target}.prx)
endforeach()
add_custom_target(focused_patched ALL DEPENDS ${patched})
if(BIO_CONTROL)
 get_target_property(sslSources libSceLibreSsl SOURCES)
 list(REMOVE_ITEM sslSources /src/core/libs/prx/libSceLibreSsl/src/Bio.cpp)
 set_property(TARGET libSceLibreSsl PROPERTY SOURCES ${sslSources})
 target_sources(libSceLibreSsl PRIVATE /validation/BioNoGrowthWipe.cpp)
endif()

The optional control replaces only the single clearBuffer(buffer); immediately preceding free_nid_postfix(buffer.data); in a copy at /validation/BioNoGrowthWipe.cpp. It uses the same test executable sources. Generator recovery deletes only <build>/prx/libSceLibreSsl/ErrorStrings.inc then builds libSceLibreSsl libSceLibreSsl3 guest_libressl_error_string_tests. Native selection is ctest --test-dir <build> -R "^(guest_libressl|guest_crypto_memcmp)" -E "_patched$" --output-on-failure --no-tests=error; patched selection is the applicable ^guest_libressl_(bio|cmac)_patched$. The ERR head has no native/patched BIO/CMAC selection.

Complete overlap output (limitations retained)

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 9571 BIO_ctrl
BIO_free
BIO_new
BIO_new_mem_buf
BIO_puts
BIO_s_mem
BIO_write
ERR_error_string
ERR_error_string_n
ERR_free_strings
ERR_load_crypto_strings
ERR_peek_last_error
controlMemory
createMemory
destroyMemory
getsMemory
putsMemory
readMemory
writeMemory
3rdparty/libressl-openbsd
core/libs/prx/libSceLibreSsl/ErrorQueue.cmake
core/libs/prx/libSceLibreSsl/ErrorQueue.cpp
core/libs/prx/libSceLibreSsl/ErrorQueue.hpp
core/libs/prx/libSceLibreSsl/GenerateErrorStrings.py
core/libs/prx/libSceLibreSsl/MemoryBio.cmake
core/libs/prx/libSceLibreSsl/include/Bio.hpp
core/libs/prx/libSceLibreSsl/src/Bio.cpp
core/libs/tests/GuestLibreSslBio.cpp
core/libs/tests/GuestLibreSslErrors.cpp
PR 10490 core/libs/prx/libSceLibreSsl3/Export.cpp L44-66
PR 10557 docs/dev/debt/libSceLibreSsl3.md L2
PR 10631 docs/dev/debt/libSceLibreSsl3.md L2

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.

Pull request Shared files not compared
PR 674 .gitmodules
PR 1835 .gitmodules
PR 5021 .gitmodules
core/libs/CMakeLists.txt
PR 7275 core/libs/CMakeLists.txt
PR 8650 core/libs/CMakeLists.txt
PR 9156 core/libs/CMakeLists.txt
PR 9161 core/libs/CMakeLists.txt
PR 9284 core/libs/CMakeLists.txt
PR 9293 core/libs/CMakeLists.txt
PR 9297 core/libs/CMakeLists.txt
PR 9302 core/libs/CMakeLists.txt
PR 9383 core/libs/CMakeLists.txt
PR 9446 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9448 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 9571 .gitmodules
3rdparty/libressl-openbsd
core/libs/CMakeLists.txt
core/libs/prx/libSceLibreSsl/ErrorQueue.cmake
core/libs/prx/libSceLibreSsl/ErrorQueue.cpp
core/libs/prx/libSceLibreSsl/ErrorQueue.hpp
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/GenerateErrorStrings.py
core/libs/prx/libSceLibreSsl/MemoryBio.cmake
core/libs/prx/libSceLibreSsl/include/Api.hpp
core/libs/prx/libSceLibreSsl/include/Bio.hpp
core/libs/prx/libSceLibreSsl/include/Error.hpp
core/libs/prx/libSceLibreSsl/src/Bio.cpp
core/libs/prx/libSceLibreSsl/src/Error.cpp
core/libs/prx/libSceLibreSsl3/Export.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
core/libs/tests/GuestLibreSslBio.cpp
core/libs/tests/GuestLibreSslError.cpp
core/libs/tests/GuestLibreSslErrors.cpp
docs/dev/debt/libSceLibreSsl.md
docs/dev/debt/libSceLibreSsl3.md
PR 9970 core/libs/prx/libSceLibreSsl3/Export.cpp
docs/dev/debt/libSceLibreSsl3.md
PR 10395 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10418 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10427 core/libs/CMakeLists.txt
PR 10448 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10450 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10475 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10477 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10478 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10481 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10482 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10483 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10485 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10486 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10488 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10508 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10570 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10571 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10834 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10878 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
core/libs/tests/GuestLibreSslError.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10915 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11003 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11089 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11100 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11105 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11128 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11129 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11138 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11143 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11146 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11151 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11174 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11175 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11176 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11189 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11359 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11466 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11553 docs/dev/debt/libSceLibreSsl.md
PR 11662 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md

No full-product/whole-suite, new Windows, sanitizer, title, PS5, or hosted product-CI pass is claimed. Maintainer-dispatched full Linux/Windows CI and current-head review remain outstanding. AI-assisted: yes.

@msbutt1 msbutt1 mentioned this pull request Oct 30, 2026
12 tasks done
@Felipebmaitan

Copy link
Copy Markdown
Contributor Author

The published BIO repairs in bf4cc8e079b7d3e0daab2fd1fe2f4ea678ecd798 remain unchanged in current-main composition #9571 1dcad0a85980490ed6705d664fdcbe0f3e5e2bf2, tested against main de824c2919ca65086c6324a1e0388866a7327eea.

Native and patched BIO tests both pass. They retain normal dispatch/callbacks for nonnegative null/zero writes, owned/read-only results, retry flags, error ordering and accounting, plus the regression that seeds spare capacity with nonzero bytes and observes full-allocation wiping at growth and destruction. The existing bounded negative-control evidence is historical; its identical source/fixture was not reworked or rerun unnecessarily. ERR remains numeric throughout load/free and its generator dependencies remain testing-only.

The complete focused combined selection passes 39 native + 3 patched cases with actual source-built libraries. Headers, scoped registration, conventions and whitespace pass. This is amd64 Docker on Apple Silicon, with the existing userfaultfd comparison fallback, not a full product, new Windows/macOS runtime, sanitizer or console run. No branch/code change was needed on this settled prerequisite; this lower head was not independently rebuilt. The updated template and current-main validation response record exact heads, commands and limits. #9446 ordering remains an external CMAC blocker and has been explicitly followed up. AI-assisted: yes.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@Felipebmaitan Thank you for the memory BIOs, and for your patience with this stack; it has waited a long time. We read the BIO code against LibreSSL 2.x (bss_mem.c, bio_lib.c and BUF_MEM_grow_clean): the struct layouts, read/write/gets/reset, growth and wiping, the control commands and the callback codes all match. Two small things before merge:

  1. GuestLibreSslBio.cpp:504-507: the RequireUnsupported([&] { BIO_free_nid_postfix(bio); }) case with extraData set asserts that freeing a BIO that carries ex-data throws. Freeing such a BIO is a valid call that the module handles; we just don't implement ex-data yet. The repository's test rule is that tests must not assert that an unimplemented path throws, because that assertion breaks as soon as someone implements it. Could you drop that case (and the references == 1 check right after it)? The BIO_free refusal itself can stay as it is.
  2. docs/dev/debt/libSceLibreSsl.md, pending-exports line: it still says 299 named callable exports, but with this PR Export.cpp has 289 NotImplemented_nid_no_patch stubs (BIO_ctrl, BIO_free, BIO_new, BIO_new_mem_buf, BIO_puts, BIO_s_mem and BIO_write are now implemented). On feat(libSceLibreSsl): implement numeric ERR formatting and newest peeking #9535 alone the count is 296. Could you update the number on each branch (it will need a recount against main at landing anyway)?

Everything else looks right to us. Thanks again.

@Felipebmaitan

Felipebmaitan commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor Author

@oneandonlydean Addressed the remaining maintainer request on the existing stack, refreshed bottom-up without force-pushing or dropping maintainer ancestry:

This PR: 9028a3e2c10935429bbdc3232263d35f97c6766a, integrated main 4ac683fe026c3368e508ace9745d3017e12a1207. Pending exports were independently counted on each resulting branch: ERR 287, BIO 280, CMAC 257. Two counts agree on every head: literal NotImplemented_nid_no_patch(__func__) calls and exported function bodies beginning with that call. The debt numbers match; the older observed 296/289 values were not blindly applied. CMAC's combined count remains 257.

The BIO test change removes exactly the ex-data assignment, RequireUnsupported(BIO_free) call, following reference assertion, and reset. It is present on both BIO and CMAC. Production BIO_free refusal is byte-identical, and supported null/zero dispatch/callback, retry/error/accounting, nonzero-slack full-capacity growth wiping and destruction wiping remain covered by passing native/patched tests. The ERR implementation/generator fragments and CMAC/BN implementations and supported fixtures are otherwise unchanged; main's newer sources and ERR lifecycle assertions are retained. ENGINE refusal assertion remains absent from CMAC tests.

Exact head 9028a3e2c10935429bbdc3232263d35f97c6766a, main integration base 4ac683fe026c3368e508ace9745d3017e12a1207. Ubuntu 24.04.5 amd64 Docker container on Apple Silicon, GCC 13.3.0, CMake 3.28.3, Ninja 1.11.1, Python 3.12.3, Release.

  • 42/42 native + 2/2 patched focused CTests pass on this head, covering ERR queue/numeric/load/free, available BIO/CMAC/BN cases and main's LibreSSL/LibreSSL3 regressions. Source-built actual libc/libkernel/LibreSSL/LibreSSL3 and repository NID patcher; separate native/patched loader paths. Each layer was reconfigured and rebuilt in the external component harness.
  • Generated ERR fixture deleted: runtime libraries build with it absent; the formatter target regenerates the same SHA256 (44af6828fdc064ca16f94aeb07ac913651d2bfce0f5ecbeee6b9b476e6be24e3); all three lifecycle cases pass again. Runtime Ninja graphs exclude the generator and compile src/Error.cpp once.
  • Public headers: 399 libraries / 26,750 exports, unique declarations and umbrella coverage; strict standalone compilation with Clang targeting x86-64 macOS (compile-only). All 37 scoped executable registrations pass. Full main/old implementation/NID preservation audit passes.
  • python3 tools/check_conventions.py --base origin/main and whitespace pass in an isolated Git context pinning origin/main to the integration base above, without changing shared tracking refs.
  • Overlap scan ran for this head and returned exit 2, reporting adjacent conflicts, inherited stack functions and incomplete comparisons. Shared-file/function inventories were reviewed: owned downstreams inherit ERR/BIO, feat(libSceLibreSsl): implement file and socket BIO adapters #12928 explicitly depends on feat(libSceLibreSsl): implement memory BIOs #9536 and reuses it, and feat(libSceLibreSsl): implement the BN_ BIGNUM, BN_CTX, conversion, word, BN_mul and BN_mod_inverse functions #9446's BN work is preserved in CMAC. Remaining external comparisons and mechanical conflicts are recorded in the validation reply; no clean-overlap or external-order agreement is claimed.

The harness imports actual repository library/test fragments, source-building pinned dependencies; it is not the full root/product suite. Docker denies userfaultfd, invoking libc's existing comparison fallback. No new local Windows/macOS runtime, sanitizer, title or physical-console run was performed; no skipped/pending hosted job is counted as passed. Firmware-module evidence remains PC execution with stand-in imports. Earlier no-Python fragment and bounded BIO negative-control evidence is historical; those settled checks were not rerun, and neither production BIO nor the wipe assertions changed. Hosted CI for 9028a3e2c10935429bbdc3232263d35f97c6766a: windows, conventions, library-portability, eligibility, labels and report succeeded. linux, relinker, relinker-asan, register-context and write-watch were skipped; an earlier conventions run was cancelled. GitHub reports CLEAN / MERGEABLE. Skipped jobs are not counted as executed. Maintainer re-review is still pending; the historical changes-requested review remains recorded. Exact logs, harness, audits and overlap limitations are in the latest validation reply.

Owned order remains #9535 → #9536 → #9571. External blocker only for CMAC: the #9446 author has not confirmed the proposed #9446-before-#9571 order in the linked request; no change or agreement is attributed to that branch. Its independent BN firmware/rebase work is not claimed fixed. No merge or replacement PR. AI-assisted: yes.

Native focused tests
Internal ctest changing into directory: /validation/build
Test project /validation/build
      Start  1: guest_libressl_errors
 1/42 Test  #1: guest_libressl_errors ........................   Passed    0.27 sec
      Start  2: guest_libressl_free_strings
 2/42 Test  #2: guest_libressl_free_strings ..................   Passed    0.21 sec
      Start  3: guest_libressl_free_strings_first
 3/42 Test  #3: guest_libressl_free_strings_first ............   Passed    0.20 sec
      Start  4: guest_libressl_bio
 4/42 Test  #4: guest_libressl_bio ...........................   Passed    0.21 sec
      Start  6: guest_libressl_protocol
 5/42 Test  #6: guest_libressl_protocol ......................   Passed    0.12 sec
      Start  8: guest_libressl_x509_errors
 6/42 Test  #8: guest_libressl_x509_errors ...................   Passed    0.08 sec
      Start  9: guest_libressl_digest
 7/42 Test  #9: guest_libressl_digest ........................   Passed    0.33 sec
      Start 10: guest_libressl_asn1
 8/42 Test #10: guest_libressl_asn1 ..........................   Passed    0.11 sec
      Start 11: guest_libressl_asn1_allocator
 9/42 Test #11: guest_libressl_asn1_allocator ................   Passed    0.15 sec
      Start 12: guest_libressl_ex_data
10/42 Test #12: guest_libressl_ex_data .......................   Passed    0.09 sec
      Start 13: guest_libressl_des
11/42 Test #13: guest_libressl_des ...........................   Passed    0.17 sec
      Start 14: guest_libressl_runtime
12/42 Test #14: guest_libressl_runtime .......................   Passed    0.23 sec
      Start 15: guest_libressl_aes
13/42 Test #15: guest_libressl_aes ...........................   Passed    0.05 sec
      Start 16: guest_libressl_error
14/42 Test #16: guest_libressl_error .........................   Passed    0.06 sec
      Start 17: guest_libressl_ocsp
15/42 Test #17: guest_libressl_ocsp ..........................   Passed    0.05 sec
      Start 18: guest_libressl_stack
16/42 Test #18: guest_libressl_stack .........................   Passed    0.10 sec
      Start 19: guest_libressl_general_name
17/42 Test #19: guest_libressl_general_name ..................   Passed    0.07 sec
      Start 20: guest_libressl_ui
18/42 Test #20: guest_libressl_ui ............................   Passed    0.05 sec
      Start 21: guest_libressl_rsa
19/42 Test #21: guest_libressl_rsa ...........................   Passed    0.05 sec
      Start 22: guest_libressl_x509_store_context
20/42 Test #22: guest_libressl_x509_store_context ............   Passed    0.05 sec
      Start 23: guest_libressl_pkey_type
21/42 Test #23: guest_libressl_pkey_type .....................   Passed    0.07 sec
      Start 24: guest_libressl_cipher
22/42 Test #24: guest_libressl_cipher ........................   Passed    0.05 sec
      Start 25: guest_libressl_alert
23/42 Test #25: guest_libressl_alert .........................   Passed    0.05 sec
      Start 26: guest_libressl_version
24/42 Test #26: guest_libressl_version .......................   Passed    0.04 sec
      Start 27: guest_libressl_crypto_locks
25/42 Test #27: guest_libressl_crypto_locks ..................   Passed    0.05 sec
      Start 28: guest_libressl_object_text
26/42 Test #28: guest_libressl_object_text ...................   Passed    0.05 sec
      Start 29: guest_libressl_object_allocation
27/42 Test #29: guest_libressl_object_allocation .............   Passed    0.04 sec
      Start 30: guest_libressl_x509_store
28/42 Test #30: guest_libressl_x509_store ....................   Passed    0.05 sec
      Start 31: guest_libressl_x509_store_allocator
29/42 Test #31: guest_libressl_x509_store_allocator ..........   Passed    0.05 sec
      Start 32: guest_libressl_x509_verify_param
30/42 Test #32: guest_libressl_x509_verify_param .............   Passed    0.05 sec
      Start 33: guest_libressl_x509_verify_param_allocator
31/42 Test #33: guest_libressl_x509_verify_param_allocator ...   Passed    0.05 sec
      Start 34: guest_libressl_x509_lookup
32/42 Test #34: guest_libressl_x509_lookup ...................   Passed    0.05 sec
      Start 35: guest_libressl_x509_lookup_allocator
33/42 Test #35: guest_libressl_x509_lookup_allocator .........   Passed    0.05 sec
      Start 36: guest_libressl3_pkey_getters
34/42 Test #36: guest_libressl3_pkey_getters .................   Passed    0.04 sec
      Start 37: guest_crypto_memcmp
35/42 Test #37: guest_crypto_memcmp ..........................   Passed    0.05 sec
      Start 38: guest_libressl3_digest
36/42 Test #38: guest_libressl3_digest .......................   Passed    0.08 sec
      Start 39: guest_libressl3_digest_context
37/42 Test #39: guest_libressl3_digest_context ...............   Passed    0.06 sec
      Start 40: guest_libressl3_asn1
38/42 Test #40: guest_libressl3_asn1 .........................   Passed    0.08 sec
      Start 41: guest_libressl3_x509_verify_param
39/42 Test #41: guest_libressl3_x509_verify_param ............   Passed    0.05 sec
      Start 42: guest_libressl3_stack
40/42 Test #42: guest_libressl3_stack ........................   Passed    0.05 sec
      Start 43: guest_libressl3_cipher
41/42 Test #43: guest_libressl3_cipher .......................   Passed    0.05 sec
      Start 44: guest_libressl3_key_reference
42/42 Test #44: guest_libressl3_key_reference ................   Passed    0.07 sec

100% tests passed, 0 tests failed out of 42

Total Test time (real) =   4.17 sec
Patched focused tests
Internal ctest changing into directory: /validation/build
Test project /validation/build
    Start 5: guest_libressl_bio_patched
1/2 Test #5: guest_libressl_bio_patched .......   Passed    0.08 sec
    Start 7: guest_libressl_protocol_nid
2/2 Test #7: guest_libressl_protocol_nid ......   Passed    0.06 sec

100% tests passed, 0 tests failed out of 2

Total Test time (real) =   0.18 sec
ERR fixture recovery
44af6828fdc064ca16f94aeb07ac913651d2bfce0f5ecbeee6b9b476e6be24e3  /validation/build/prx/libSceLibreSsl/ErrorStrings.inc
[0/2] Re-checking globbed directories...
ninja: no work to do.
[0/2] Re-checking globbed directories...
[1/3] Generating prx/libSceLibreSsl/ErrorStrings.inc
[2/3] Building CXX object CMakeFiles/guest_libressl_error_string_tests.dir/src/core/libs/tests/GuestLibreSslErrors.cpp.o
[3/3] Linking CXX executable tests/guest_libressl_error_string_tests
44af6828fdc064ca16f94aeb07ac913651d2bfce0f5ecbeee6b9b476e6be24e3  /validation/build/prx/libSceLibreSsl/ErrorStrings.inc
Internal ctest changing into directory: /validation/build
Test project /validation/build
    Start 1: guest_libressl_errors
1/3 Test #1: guest_libressl_errors ...............   Passed    0.13 sec
    Start 2: guest_libressl_free_strings
2/3 Test #2: guest_libressl_free_strings .........   Passed    0.07 sec
    Start 3: guest_libressl_free_strings_first
3/3 Test #3: guest_libressl_free_strings_first ...   Passed    0.07 sec

100% tests passed, 0 tests failed out of 3

Total Test time (real) =   0.37 sec
Preservation/count/NID audit
head 9028a3e2c10935429bbdc3232263d35f97c6766a
main 4ac683fe026c3368e508ace9745d3017e12a1207
ancestor retained bf4cc8e079b7d3e0daab2fd1fe2f4ea678ecd798
ancestor retained 4ac683fe026c3368e508ace9745d3017e12a1207
ancestor retained b8dc89c0f887e725b97ad2ea112fb6eded347e27
Published runtime implementations, generator and fragments byte-identical
BIO fixture differs only by requested four-line ex-data case removal
All main implementation sources/inventories retained except preserved extended ERR queue
Pending exports: 280 literal calls = 280 direct public stub bodies = debt count
libSceLibreSsl: 399 public definitions; exact old/main union and NIDs retained
libSceLibreSsl3: 260 public definitions; exact old/main union and NIDs retained
One ERR runtime source/test registration; runtime queue unconditional; generator/Python/submodule test-only
Headers
399 libraries, 26750 exports: unique declarations and umbrella coverage verified
Standalone headers verified
Scoped registrations
run  guest_crypto_memcmp_tests
run  guest_libressl3_asn1_tests
run  guest_libressl3_cipher_tests
run  guest_libressl3_digest_context_tests
run  guest_libressl3_digest_tests
run  guest_libressl3_key_reference_tests
run  guest_libressl3_pkey_getters_tests
run  guest_libressl3_stack_tests
run  guest_libressl3_x509_verify_param_tests
run  guest_libressl_aes_tests
run  guest_libressl_alert_tests
run  guest_libressl_asn1_tests
run  guest_libressl_bio_patched_tests
run  guest_libressl_bio_tests
run  guest_libressl_cipher_tests
run  guest_libressl_crypto_locks_tests
run  guest_libressl_des_tests
run  guest_libressl_digest_tests
run  guest_libressl_error_string_tests
run  guest_libressl_error_tests
run  guest_libressl_ex_data_tests
run  guest_libressl_general_name_tests
run  guest_libressl_object_allocation_tests
run  guest_libressl_object_text_tests
run  guest_libressl_ocsp_tests
run  guest_libressl_pkey_type_tests
run  guest_libressl_protocol_tests
run  guest_libressl_rsa_tests
run  guest_libressl_runtime_tests
run  guest_libressl_stack_tests
run  guest_libressl_ui_tests
run  guest_libressl_version_tests
run  guest_libressl_x509_errors_tests
run  guest_libressl_x509_lookup_tests
run  guest_libressl_x509_store_context_tests
run  guest_libressl_x509_store_tests
run  guest_libressl_x509_verify_param_tests
Conventions
All conventions checks passed.
Overlap output: exit 2, including incomplete comparisons

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 9448 docs/dev/debt/libSceLibreSsl.md L10
PR 9571 core/libs/CMakeLists.txt L301
core/libs/prx/libSceLibreSsl/Export.cpp L10, L40-44, L50-59, L65-69, L80-84, L90-162, L452-466
core/libs/prx/libSceLibreSsl/include/Api.hpp L2-3, L262, L264-265, L267, L270, L272-286, L344-350
core/libs/tests/GuestLibreSslBio.cpp
docs/dev/debt/libSceLibreSsl.md L10, L17, L31
BIO_ctrl
BIO_free
BIO_new
BIO_new_mem_buf
BIO_puts
BIO_s_mem
BIO_write
ERR_error_string
ERR_error_string_n
ERR_free_strings
ERR_load_crypto_strings
ERR_peek_last_error
controlMemory
createMemory
destroyMemory
getsMemory
putsMemory
readMemory
writeMemory
3rdparty/libressl-openbsd
core/libs/prx/libSceLibreSsl/ErrorQueue.cmake
core/libs/prx/libSceLibreSsl/ErrorQueue.cpp
core/libs/prx/libSceLibreSsl/ErrorQueue.hpp
core/libs/prx/libSceLibreSsl/GenerateErrorStrings.py
core/libs/prx/libSceLibreSsl/MemoryBio.cmake
core/libs/prx/libSceLibreSsl/include/Bio.hpp
core/libs/prx/libSceLibreSsl/src/Bio.cpp
core/libs/tests/GuestLibreSslBio.cpp
core/libs/tests/GuestLibreSslErrors.cpp
PR 10078 docs/dev/debt/libSceLibreSsl.md L10
PR 10395 docs/dev/debt/libSceLibreSsl.md L10
PR 10448 docs/dev/debt/libSceLibreSsl.md L10
PR 10450 docs/dev/debt/libSceLibreSsl.md L10
PR 10477 docs/dev/debt/libSceLibreSsl.md L10
PR 10478 docs/dev/debt/libSceLibreSsl.md L10
PR 10481 docs/dev/debt/libSceLibreSsl.md L10
PR 10482 docs/dev/debt/libSceLibreSsl.md L10
PR 10483 docs/dev/debt/libSceLibreSsl.md L10
PR 10485 docs/dev/debt/libSceLibreSsl.md L10
PR 10486 docs/dev/debt/libSceLibreSsl.md L10
PR 10488 docs/dev/debt/libSceLibreSsl.md L10
PR 10490 core/libs/prx/libSceLibreSsl3/Export.cpp L44-66
PR 10557 docs/dev/debt/libSceLibreSsl3.md L2
PR 10570 docs/dev/debt/libSceLibreSsl.md L10
PR 10834 core/libs/prx/libSceLibreSsl/Export.cpp L452-496
docs/dev/debt/libSceLibreSsl.md L10
PR 10878 docs/dev/debt/libSceLibreSsl.md L10, L17
PR 10915 docs/dev/debt/libSceLibreSsl.md L10
PR 11003 docs/dev/debt/libSceLibreSsl.md L10
PR 11128 docs/dev/debt/libSceLibreSsl.md L10, L17
PR 11129 docs/dev/debt/libSceLibreSsl.md L10
PR 11138 docs/dev/debt/libSceLibreSsl.md L10, L17
PR 11143 docs/dev/debt/libSceLibreSsl.md L10
PR 11146 docs/dev/debt/libSceLibreSsl.md L10
PR 11151 docs/dev/debt/libSceLibreSsl.md L10, L17
PR 11174 docs/dev/debt/libSceLibreSsl.md L10, L17
PR 11175 docs/dev/debt/libSceLibreSsl.md L10, L17
PR 11176 docs/dev/debt/libSceLibreSsl.md L10, L17
PR 11553 docs/dev/debt/libSceLibreSsl.md L10
PR 12730 docs/dev/debt/libSceLibreSsl.md L10, L17
PR 12928 core/libs/prx/libSceLibreSsl/Export.cpp L10, L40-44, L50-74, L80-97, L452-466
core/libs/prx/libSceLibreSsl/MemoryBio.cmake
core/libs/prx/libSceLibreSsl/include/Api.hpp L3, L262, L264-268, L270-273, L345-347
core/libs/tests/GuestLibreSslBio.cpp
docs/dev/debt/libSceLibreSsl.md L17, L31
BIO_ctrl
BIO_free
BIO_new
BIO_new_mem_buf
BIO_puts
BIO_s_mem
BIO_write
ERR_error_string
ERR_error_string_n
ERR_free_strings
ERR_load_crypto_strings
ERR_peek_last_error
controlMemory
createMemory
destroyMemory
getsMemory
putsMemory
readMemory
writeMemory
3rdparty/libressl-openbsd
core/libs/prx/libSceLibreSsl/ErrorQueue.cmake
core/libs/prx/libSceLibreSsl/ErrorQueue.cpp
core/libs/prx/libSceLibreSsl/ErrorQueue.hpp
core/libs/prx/libSceLibreSsl/GenerateErrorStrings.py
core/libs/prx/libSceLibreSsl/MemoryBio.cmake
core/libs/prx/libSceLibreSsl/include/Bio.hpp
core/libs/prx/libSceLibreSsl/src/Bio.cpp
core/libs/tests/GuestLibreSslBio.cpp
core/libs/tests/GuestLibreSslErrors.cpp
PR 14115 docs/dev/debt/libSceLibreSsl.md L10-11

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.

Pull request Shared files not compared
PR 1835 .gitmodules
PR 5021 .gitmodules
core/libs/CMakeLists.txt
PR 7275 core/libs/CMakeLists.txt
PR 8650 core/libs/CMakeLists.txt
PR 9019 core/libs/CMakeLists.txt
PR 9156 core/libs/CMakeLists.txt
PR 9162 core/libs/CMakeLists.txt
PR 9293 core/libs/CMakeLists.txt
PR 9297 core/libs/CMakeLists.txt
PR 9302 core/libs/CMakeLists.txt
PR 9383 core/libs/CMakeLists.txt
PR 9446 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9855 .gitmodules
PR 9970 core/libs/prx/libSceLibreSsl3/Export.cpp
docs/dev/debt/libSceLibreSsl3.md
PR 10418 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10461 core/libs/prx/libSceLibreSsl3/Export.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 10508 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10631 core/libs/prx/libSceLibreSsl3/Export.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 11359 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11466 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11662 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 12642 core/libs/CMakeLists.txt
PR 12729 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 12754 core/libs/prx/libSceLibreSsl3/Export.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 13253 core/libs/CMakeLists.txt
PR 13256 core/libs/CMakeLists.txt
PR 13266 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 13285 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 13546 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 13547 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 13578 .gitmodules
PR 13860 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
core/libs/tests/GuestLibreSslError.cpp
docs/dev/debt/libSceLibreSsl.md
PR 13877 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 14212 docs/dev/debt/libSceLibreSsl.md
docs/dev/debt/libSceLibreSsl3.md
PR 14299 core/libs/CMakeLists.txt
Reproduction harness and test commands

Configure: cmake -S /validation/harness -B /validation/build -G Ninja -DCMAKE_BUILD_TYPE=Release; build: cmake --build /validation/build -j4. Mount the exact checkout read-only at /src, source-initialized pinned mbedTLS (including framework), libressl-openbsd, ZArchive and zstd submodules; the external harness's 3rdparty symlink points to /src/3rdparty, tests to /src/core/libs/tests.

cmake_minimum_required(VERSION 3.20)
project(LibreSslStackValidation LANGUAGES C CXX)
enable_testing()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
option(LIBRESSL_TESTING "Build focused tests" ON)
set(LIBS_INCLUDE_DIR /src/core/libs)
set(ANYPS5_TEST_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests)
set(PATCHED_DIR ${CMAKE_BINARY_DIR}/patched)
function(add_test_executable target)
 add_executable(${target} ${ARGN})
 set_target_properties(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ANYPS5_TEST_OUTPUT_DIRECTORY})
endfunction()
function(configure_windows_unwind target)
endfunction()
function(configure_host_test_executable target)
endfunction()
function(add_asan_test_options)
endfunction()
add_compile_options(-ffunction-sections -fdata-sections)
add_link_options(-Wl,--gc-sections)
include(/src/cmake/ZArchive.cmake)
set(BUILD_TESTING OFF)
add_library(libc SHARED)
add_subdirectory(/src/core/libs/prx/libc libc)
target_include_directories(libc PRIVATE ${LIBS_INCLUDE_DIR})
target_link_options(libc PRIVATE LINKER:-z,now)
target_link_options(libc INTERFACE LINKER:--no-as-needed)
add_subdirectory(/src/core/libs/prx/libkernel kernel)
add_subdirectory(/src/core/libs/prx/libSceSsl ssl)
set(BUILD_TESTING ${LIBRESSL_TESTING})
add_subdirectory(/src/core/libs/prx/libSceLibreSsl libressl)
add_subdirectory(/src/core/libs/prx/libSceLibreSsl3 libressl3)
foreach(target libSceLibreSsl libSceLibreSsl3)
 target_link_libraries(${target} PUBLIC libc PRIVATE libkernel)
endforeach()
include(/src/core/libs/prx/libSceLibreSsl/ErrorQueue.cmake)
if(EXISTS /src/core/libs/prx/libSceLibreSsl/MemoryBio.cmake)
 include(/src/core/libs/prx/libSceLibreSsl/MemoryBio.cmake)
endif()
if(EXISTS /src/core/libs/prx/libSceLibreSsl/Cmac.cmake)
 include(/src/core/libs/prx/libSceLibreSsl/Cmac.cmake)
endif()
add_custom_target(libs)
include(/src/core/libs/prx/libSceLibreSsl/ProtocolSelection.cmake)
file(GLOB patcherSources /src/core/libs/nid/src/*.cpp)
add_executable(nid_patcher ${patcherSources})
target_include_directories(nid_patcher PRIVATE /src/core/libs/nid/include)
foreach(target libc libkernel libSceLibreSsl libSceLibreSsl3)
 set_target_properties(${target} PROPERTIES PREFIX "" SUFFIX .prx BUILD_RPATH "$ORIGIN" BUILD_WITH_INSTALL_RPATH ON INSTALL_RPATH "$ORIGIN")
 add_custom_command(OUTPUT ${PATCHED_DIR}/${target}.prx
  COMMAND ${CMAKE_COMMAND} -E make_directory ${PATCHED_DIR}
  COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${target}> ${PATCHED_DIR}/${target}.prx
  COMMAND $<TARGET_FILE:nid_patcher> ${target} ${PATCHED_DIR}/${target}.prx
  DEPENDS ${target} nid_patcher)
 list(APPEND patched ${PATCHED_DIR}/${target}.prx)
endforeach()
add_custom_target(focused_patched ALL DEPENDS ${patched})

add_dependencies(libs focused_patched)
set -eu
layer=$1
LD_LIBRARY_PATH=/validation/build:/validation/build/kernel:/validation/build/libressl:/validation/build/libressl3 ctest --test-dir /validation/build -R '^(guest_libressl|guest_crypto_memcmp)' -E '(_patched|_nid)$' --output-on-failure --no-tests=error > /evidence/$layer-native.log 2>&1
LD_LIBRARY_PATH=/validation/build/patched ctest --test-dir /validation/build -R '^guest_libressl_((bio|cmac)_patched|protocol_nid)$' --output-on-failure --no-tests=error > /evidence/$layer-patched.log 2>&1
python3 /src/tools/check_test_registration.py --list /validation/build > /evidence/$layer-registrations.txt
ninja -C /validation/build -t commands libressl/libSceLibreSsl.prx libressl3/libSceLibreSsl3.prx > /evidence/$layer-runtime-commands.txt
! grep -q GenerateErrorStrings.py /evidence/$layer-runtime-commands.txt
test "$(grep -c -- '-c /src/core/libs/prx/libSceLibreSsl/src/Error.cpp' /evidence/$layer-runtime-commands.txt)" = 1
sha256sum /validation/build/prx/libSceLibreSsl/ErrorStrings.inc > /evidence/$layer-fixture.log
rm /validation/build/prx/libSceLibreSsl/ErrorStrings.inc
cmake --build /validation/build --target libSceLibreSsl libSceLibreSsl3 >> /evidence/$layer-fixture.log 2>&1
test ! -e /validation/build/prx/libSceLibreSsl/ErrorStrings.inc
cmake --build /validation/build --target guest_libressl_error_string_tests >> /evidence/$layer-fixture.log 2>&1
sha256sum /validation/build/prx/libSceLibreSsl/ErrorStrings.inc >> /evidence/$layer-fixture.log
LD_LIBRARY_PATH=/validation/build:/validation/build/kernel:/validation/build/libressl:/validation/build/libressl3 ctest --test-dir /validation/build -R '^guest_libressl_(errors|free_strings|free_strings_first)$' --output-on-failure --no-tests=error >> /evidence/$layer-fixture.log 2>&1
tail -5 /evidence/$layer-native.log
tail -5 /evidence/$layer-patched.log

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
@Felipebmaitan

Felipebmaitan commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

@oneandonlydean @MarcZX10 Refreshed the existing branch after its main conflict; please re-review exact head 242c41111435bd5d02a55d17acb54ea35146a3c8. Published previous heads and maintainer history remain ancestors. #9535 is now merged and its branch was left untouched.

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 literal NotImplemented_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.

Current owned heads: #9536 242c41111435bd5d02a55d17acb54ea35146a3c8, #9571 4b6e1f0c71835899f5d6947c931c9519de88405f. Their independently recounted pending-export totals are 254 and 231 respectively. The earlier ex-data assertion removal and all numeric ERR/test-only generator/null-zero BIO repairs are unchanged.

Exact head 242c41111435bd5d02a55d17acb54ea35146a3c8, integrated main b28bb772177768f99874ca38f6252cd0139acf2a. 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.

  • 46/46 native + 2/2 patched focused CTests pass, including ERR queue/numeric/load/free, BIO callbacks/null/zero/retry/errors/nonzero-slack full-capacity growth and destruction wiping, available CMAC/BN cases, and current main's LibreSSL/LibreSSL3 regressions, including new EVP and version cases.
  • Fresh initially empty source-built component build for BIO, reconfigured/rebuilt for CMAC. Actual libc/libkernel/LibreSSL/LibreSSL3 and repository NID patcher; pinned mbedTLS/ZArchive/zstd built from source. Separate native/patched loader paths. External harness imports actual repository library/test fragments; this is not a full root/product build.
  • ERR generated fixture deletion: runtime libraries build with it absent; formatter target regenerates it with unchanged SHA256 44af6828fdc064ca16f94aeb07ac913651d2bfce0f5ecbeee6b9b476e6be24e3; three lifecycle cases pass again. Runtime graphs exclude the generator and compile the shared queue once.
  • Header audit: 399 libraries / 27,365 exports, canonical unique declarations and umbrella coverage; strict standalone Clang compilation targeting x86-64 macOS passes (compile-only). All 41 scoped test executables are registered. Exact old/main public-definition/NID union and main runtime implementations are retained; counts and registrations independently audited.
  • python3 tools/check_conventions.py --base origin/main and whitespace pass in isolated Git contexts pinning origin/main to the integrated SHA above, without changing shared tracking refs.
  • Overlap scans completed with exit 2, reporting adjacent/source-list/debt conflicts, inherited BIO code and incomplete comparisons. Reported shared-file/function inventories were reviewed. feat(libSceLibreSsl): implement file and socket BIO adapters #12928 inherits BIO and explicitly depends on feat(libSceLibreSsl): implement memory BIOs #9536; feat(libSceLibreSsl): implement the BN_ BIGNUM, BN_CTX, conversion, word, BN_mul and BN_mod_inverse functions #9446's BN work remains preserved in CMAC. The full output and unresolved comparisons are in the latest validation reply; no clean-overlap or external-order agreement is claimed.

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, labels and report succeeded. linux, relinker, relinker-asan, register-context, write-watch and edge-watch were 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.

#9446 remains an external prerequisite for CMAC: still open at 5c3dc05f0555b066beab1184f666829d3f4af780, with its author yet to answer the order request. Its branch was not edited, its independent BN firmware/rebase feedback is not claimed resolved, and no agreement is inferred.

No merge performed. AI-assisted: yes.

Native tests
Internal ctest changing into directory: /evidence/build
Test project /evidence/build
      Start  1: guest_libressl_errors
 1/46 Test  #1: guest_libressl_errors ........................   Passed    0.04 sec
      Start  2: guest_libressl_free_strings
 2/46 Test  #2: guest_libressl_free_strings ..................   Passed    0.03 sec
      Start  3: guest_libressl_free_strings_first
 3/46 Test  #3: guest_libressl_free_strings_first ............   Passed    0.03 sec
      Start  4: guest_libressl_bio
 4/46 Test  #4: guest_libressl_bio ...........................   Passed    0.04 sec
      Start  6: guest_libressl_protocol
 5/46 Test  #6: guest_libressl_protocol ......................   Passed    0.03 sec
      Start  8: guest_libressl_x509_errors
 6/46 Test  #8: guest_libressl_x509_errors ...................   Passed    0.02 sec
      Start  9: guest_libressl_digest
 7/46 Test  #9: guest_libressl_digest ........................   Passed    0.17 sec
      Start 10: guest_libressl_asn1
 8/46 Test #10: guest_libressl_asn1 ..........................   Passed    0.03 sec
      Start 11: guest_libressl_asn1_allocator
 9/46 Test #11: guest_libressl_asn1_allocator ................   Passed    0.03 sec
      Start 12: guest_libressl_ex_data
10/46 Test #12: guest_libressl_ex_data .......................   Passed    0.03 sec
      Start 13: guest_libressl_des
11/46 Test #13: guest_libressl_des ...........................   Passed    0.03 sec
      Start 14: guest_libressl_runtime
12/46 Test #14: guest_libressl_runtime .......................   Passed    0.03 sec
      Start 15: guest_libressl_aes
13/46 Test #15: guest_libressl_aes ...........................   Passed    0.03 sec
      Start 16: guest_libressl_error
14/46 Test #16: guest_libressl_error .........................   Passed    0.03 sec
      Start 17: guest_libressl_ocsp
15/46 Test #17: guest_libressl_ocsp ..........................   Passed    0.02 sec
      Start 18: guest_libressl_stack
16/46 Test #18: guest_libressl_stack .........................   Passed    0.03 sec
      Start 19: guest_libressl_general_name
17/46 Test #19: guest_libressl_general_name ..................   Passed    0.03 sec
      Start 20: guest_libressl_ui
18/46 Test #20: guest_libressl_ui ............................   Passed    0.03 sec
      Start 21: guest_libressl_rsa
19/46 Test #21: guest_libressl_rsa ...........................   Passed    0.03 sec
      Start 22: guest_libressl_x509_store_context
20/46 Test #22: guest_libressl_x509_store_context ............   Passed    0.04 sec
      Start 23: guest_libressl_pkey_type
21/46 Test #23: guest_libressl_pkey_type .....................   Passed    0.04 sec
      Start 24: guest_libressl_evp_cipher_ctx
22/46 Test #24: guest_libressl_evp_cipher_ctx ................   Passed    0.03 sec
      Start 25: guest_libressl_cipher
23/46 Test #25: guest_libressl_cipher ........................   Passed    0.03 sec
      Start 26: guest_libressl_alert
24/46 Test #26: guest_libressl_alert .........................   Passed    0.03 sec
      Start 27: guest_libressl_version
25/46 Test #27: guest_libressl_version .......................   Passed    0.03 sec
      Start 28: guest_libressl_crypto_locks
26/46 Test #28: guest_libressl_crypto_locks ..................   Passed    0.03 sec
      Start 29: guest_libressl_object_text
27/46 Test #29: guest_libressl_object_text ...................   Passed    0.03 sec
      Start 30: guest_libressl_object_allocation
28/46 Test #30: guest_libressl_object_allocation .............   Passed    0.03 sec
      Start 31: guest_libressl_x509_store
29/46 Test #31: guest_libressl_x509_store ....................   Passed    0.03 sec
      Start 32: guest_libressl_x509_store_allocator
30/46 Test #32: guest_libressl_x509_store_allocator ..........   Passed    0.03 sec
      Start 33: guest_libressl_x509_verify_param
31/46 Test #33: guest_libressl_x509_verify_param .............   Passed    0.03 sec
      Start 34: guest_libressl_x509_verify_param_allocator
32/46 Test #34: guest_libressl_x509_verify_param_allocator ...   Passed    0.03 sec
      Start 35: guest_libressl_x509_lookup
33/46 Test #35: guest_libressl_x509_lookup ...................   Passed    0.03 sec
      Start 36: guest_libressl_x509_lookup_allocator
34/46 Test #36: guest_libressl_x509_lookup_allocator .........   Passed    0.04 sec
      Start 37: guest_libressl_x509_extension
35/46 Test #37: guest_libressl_x509_extension ................   Passed    0.03 sec
      Start 38: guest_libressl_evp
36/46 Test #38: guest_libressl_evp ...........................   Passed    0.03 sec
      Start 39: guest_libressl3_pkey_getters
37/46 Test #39: guest_libressl3_pkey_getters .................   Passed    0.03 sec
      Start 40: guest_crypto_memcmp
38/46 Test #40: guest_crypto_memcmp ..........................   Passed    0.03 sec
      Start 41: guest_libressl3_digest
39/46 Test #41: guest_libressl3_digest .......................   Passed    0.04 sec
      Start 42: guest_libressl3_digest_context
40/46 Test #42: guest_libressl3_digest_context ...............   Passed    0.03 sec
      Start 43: guest_libressl3_asn1
41/46 Test #43: guest_libressl3_asn1 .........................   Passed    0.04 sec
      Start 44: guest_libressl3_x509_verify_param
42/46 Test #44: guest_libressl3_x509_verify_param ............   Passed    0.03 sec
      Start 45: guest_libressl3_stack
43/46 Test #45: guest_libressl3_stack ........................   Passed    0.03 sec
      Start 46: guest_libressl3_cipher
44/46 Test #46: guest_libressl3_cipher .......................   Passed    0.03 sec
      Start 47: guest_libressl3_key_reference
45/46 Test #47: guest_libressl3_key_reference ................   Passed    0.04 sec
      Start 48: guest_libressl3_version
46/46 Test #48: guest_libressl3_version ......................   Passed    0.03 sec

100% tests passed, 0 tests failed out of 46

Total Test time (real) =   1.61 sec
Patched tests
Internal ctest changing into directory: /evidence/build
Test project /evidence/build
    Start 5: guest_libressl_bio_patched
1/2 Test #5: guest_libressl_bio_patched .......   Passed    0.04 sec
    Start 7: guest_libressl_protocol_nid
2/2 Test #7: guest_libressl_protocol_nid ......   Passed    0.03 sec

100% tests passed, 0 tests failed out of 2

Total Test time (real) =   0.10 sec
Fixture regeneration
44af6828fdc064ca16f94aeb07ac913651d2bfce0f5ecbeee6b9b476e6be24e3  /evidence/build/prx/libSceLibreSsl/ErrorStrings.inc
[0/2] Re-checking globbed directories...
ninja: no work to do.
[0/2] Re-checking globbed directories...
[1/3] Generating prx/libSceLibreSsl/ErrorStrings.inc
[2/3] Building CXX object CMakeFiles/guest_libressl_error_string_tests.dir/src/core/libs/tests/GuestLibreSslErrors.cpp.o
[3/3] Linking CXX executable tests/guest_libressl_error_string_tests
44af6828fdc064ca16f94aeb07ac913651d2bfce0f5ecbeee6b9b476e6be24e3  /evidence/build/prx/libSceLibreSsl/ErrorStrings.inc
Internal ctest changing into directory: /evidence/build
Test project /evidence/build
    Start 1: guest_libressl_errors
1/3 Test #1: guest_libressl_errors ...............   Passed    0.04 sec
    Start 2: guest_libressl_free_strings
2/3 Test #2: guest_libressl_free_strings .........   Passed    0.03 sec
    Start 3: guest_libressl_free_strings_first
3/3 Test #3: guest_libressl_free_strings_first ...   Passed    0.03 sec

100% tests passed, 0 tests failed out of 3

Total Test time (real) =   0.13 sec
Preservation/count/NID audit
head 242c41111435bd5d02a55d17acb54ea35146a3c8
main b28bb772177768f99874ca38f6252cd0139acf2a
ancestor retained 9028a3e2c10935429bbdc3232263d35f97c6766a
ancestor retained b28bb772177768f99874ca38f6252cd0139acf2a
Published runtime sources, fixtures and CMake fragments byte-identical; ex-data assertion remains absent
All main runtime implementation sources and inventories retained, including EVP
Pending exports: 254; literal-call, direct exported-stub-body and debt counts agree
libSceLibreSsl: 399 public definitions; exact old/main union and NIDs retained
libSceLibreSsl3: 260 public definitions; exact old/main union and NIDs retained
Exact ERR/EVP/BN source registrations retained; generator/Python/submodule testing-only
Headers
399 libraries, 27365 exports: unique declarations and umbrella coverage verified
Standalone headers verified
Scoped registrations
run  guest_crypto_memcmp_tests
run  guest_libressl3_asn1_tests
run  guest_libressl3_cipher_tests
run  guest_libressl3_digest_context_tests
run  guest_libressl3_digest_tests
run  guest_libressl3_key_reference_tests
run  guest_libressl3_pkey_getters_tests
run  guest_libressl3_stack_tests
run  guest_libressl3_version_tests
run  guest_libressl3_x509_verify_param_tests
run  guest_libressl_aes_tests
run  guest_libressl_alert_tests
run  guest_libressl_asn1_tests
run  guest_libressl_bio_patched_tests
run  guest_libressl_bio_tests
run  guest_libressl_cipher_tests
run  guest_libressl_crypto_locks_tests
run  guest_libressl_des_tests
run  guest_libressl_digest_tests
run  guest_libressl_error_string_tests
run  guest_libressl_error_tests
run  guest_libressl_evp_cipher_ctx_tests
run  guest_libressl_evp_tests
run  guest_libressl_ex_data_tests
run  guest_libressl_general_name_tests
run  guest_libressl_object_allocation_tests
run  guest_libressl_object_text_tests
run  guest_libressl_ocsp_tests
run  guest_libressl_pkey_type_tests
run  guest_libressl_protocol_tests
run  guest_libressl_rsa_tests
run  guest_libressl_runtime_tests
run  guest_libressl_stack_tests
run  guest_libressl_ui_tests
run  guest_libressl_version_tests
run  guest_libressl_x509_errors_tests
run  guest_libressl_x509_extension_tests
run  guest_libressl_x509_lookup_tests
run  guest_libressl_x509_store_context_tests
run  guest_libressl_x509_store_tests
run  guest_libressl_x509_verify_param_tests
Conventions
All conventions checks passed.
Overlap output: exit 2, including incomplete comparisons

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 9571 BIO_ctrl
BIO_free
BIO_new
BIO_new_mem_buf
BIO_puts
BIO_s_mem
BIO_write
controlMemory
createMemory
destroyMemory
getsMemory
putsMemory
readMemory
writeMemory
core/libs/prx/libSceLibreSsl/MemoryBio.cmake
core/libs/prx/libSceLibreSsl/include/Bio.hpp
core/libs/prx/libSceLibreSsl/src/Bio.cpp
core/libs/tests/GuestLibreSslBio.cpp
PR 10395 docs/dev/debt/libSceLibreSsl.md L10
PR 10448 docs/dev/debt/libSceLibreSsl.md L10
PR 12928 core/libs/prx/libSceLibreSsl/Export.cpp L10, L51-55, L61-85, L91-108
core/libs/prx/libSceLibreSsl/MemoryBio.cmake
core/libs/prx/libSceLibreSsl/include/Api.hpp L3, L320, L322-326, L328-331
core/libs/tests/GuestLibreSslBio.cpp
docs/dev/debt/libSceLibreSsl.md L17, L33
BIO_ctrl
BIO_free
BIO_new
BIO_new_mem_buf
BIO_puts
BIO_s_mem
BIO_write
controlMemory
createMemory
destroyMemory
getsMemory
putsMemory
readMemory
writeMemory
core/libs/prx/libSceLibreSsl/MemoryBio.cmake
core/libs/prx/libSceLibreSsl/include/Bio.hpp
core/libs/prx/libSceLibreSsl/src/Bio.cpp
core/libs/tests/GuestLibreSslBio.cpp

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.

Pull request Shared files not compared
PR 5021 core/libs/CMakeLists.txt
PR 7275 core/libs/CMakeLists.txt
PR 8650 core/libs/CMakeLists.txt
PR 9019 core/libs/CMakeLists.txt
PR 9156 core/libs/CMakeLists.txt
PR 9162 core/libs/CMakeLists.txt
PR 9293 core/libs/CMakeLists.txt
PR 9297 core/libs/CMakeLists.txt
PR 9302 core/libs/CMakeLists.txt
PR 9383 core/libs/CMakeLists.txt
PR 9446 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9571 core/libs/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/MemoryBio.cmake
core/libs/prx/libSceLibreSsl/include/Api.hpp
core/libs/prx/libSceLibreSsl/include/Bio.hpp
core/libs/prx/libSceLibreSsl/src/Bio.cpp
core/libs/tests/GuestLibreSslBio.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10418 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10450 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10477 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10478 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10481 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10482 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10483 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10485 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10486 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10508 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10570 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10834 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10878 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10915 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11003 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11128 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11129 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11138 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11143 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11146 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11151 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11174 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11175 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11176 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11359 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11466 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11553 docs/dev/debt/libSceLibreSsl.md
PR 11662 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 12130 core/libs/CMakeLists.txt
PR 12642 core/libs/CMakeLists.txt
PR 12729 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 12730 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 13253 core/libs/CMakeLists.txt
PR 13255 core/libs/CMakeLists.txt
PR 13256 core/libs/CMakeLists.txt
PR 13266 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 13285 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 13546 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 13547 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 13860 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 13877 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 14115 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 14212 docs/dev/debt/libSceLibreSsl.md
PR 14213 core/libs/CMakeLists.txt
PR 14264 core/libs/CMakeLists.txt
PR 14299 core/libs/CMakeLists.txt
External harness and commands

Mount the exact checkout read-only at /src, the external evidence/build directory at /evidence; the harness symlinks 3rdparty and tests to /src/3rdparty and /src/core/libs/tests. Initialize the repository-pinned mbedTLS (including framework), ZArchive, zstd and libressl-openbsd submodules. Configure with cmake -S /evidence/harness -B /evidence/build -G Ninja -DCMAKE_BUILD_TYPE=Release; build with cmake --build /evidence/build -j4. Then run the script below with bio or cmac for the corresponding exact head.

cmake_minimum_required(VERSION 3.20)
project(LibreSslStackValidation LANGUAGES C CXX)
enable_testing()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(LIBS_INCLUDE_DIR /src/core/libs)
set(ANYPS5_TEST_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests)
set(PATCHED_DIR ${CMAKE_BINARY_DIR}/patched)
function(add_test_executable target)
 add_executable(${target} ${ARGN})
 set_target_properties(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ANYPS5_TEST_OUTPUT_DIRECTORY})
endfunction()
function(configure_windows_unwind target)
endfunction()
function(configure_host_test_executable target)
endfunction()
function(add_asan_test_options)
endfunction()
add_compile_options(-ffunction-sections -fdata-sections)
add_link_options(-Wl,--gc-sections)
include(/src/cmake/ZArchive.cmake)
set(BUILD_TESTING OFF)
add_library(libc SHARED)
add_subdirectory(/src/core/libs/prx/libc libc)
target_include_directories(libc PRIVATE ${LIBS_INCLUDE_DIR})
target_link_options(libc PRIVATE LINKER:-z,now)
target_link_options(libc INTERFACE LINKER:--no-as-needed)
add_subdirectory(/src/core/libs/prx/libkernel kernel)
add_subdirectory(/src/core/libs/prx/libSceSsl ssl)
set(BUILD_TESTING ON)
add_subdirectory(/src/core/libs/prx/libSceLibreSsl libressl)
add_subdirectory(/src/core/libs/prx/libSceLibreSsl3 libressl3)
foreach(target libSceLibreSsl libSceLibreSsl3)
 target_link_libraries(${target} PUBLIC libc PRIVATE libkernel)
endforeach()
include(/src/core/libs/prx/libSceLibreSsl/ErrorQueue.cmake)
include(/src/core/libs/prx/libSceLibreSsl/MemoryBio.cmake)
if(EXISTS /src/core/libs/prx/libSceLibreSsl/Cmac.cmake)
 include(/src/core/libs/prx/libSceLibreSsl/Cmac.cmake)
endif()
add_custom_target(libs)
include(/src/core/libs/prx/libSceLibreSsl/ProtocolSelection.cmake)
file(GLOB patcherSources /src/core/libs/nid/src/*.cpp)
add_executable(nid_patcher ${patcherSources})
target_include_directories(nid_patcher PRIVATE /src/core/libs/nid/include)
foreach(target libc libkernel libSceLibreSsl libSceLibreSsl3)
 set_target_properties(${target} PROPERTIES PREFIX "" SUFFIX .prx BUILD_RPATH "$ORIGIN" BUILD_WITH_INSTALL_RPATH ON INSTALL_RPATH "$ORIGIN")
 add_custom_command(OUTPUT ${PATCHED_DIR}/${target}.prx
  COMMAND ${CMAKE_COMMAND} -E make_directory ${PATCHED_DIR}
  COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${target}> ${PATCHED_DIR}/${target}.prx
  COMMAND $<TARGET_FILE:nid_patcher> ${target} ${PATCHED_DIR}/${target}.prx
  DEPENDS ${target} nid_patcher)
 list(APPEND patched ${PATCHED_DIR}/${target}.prx)
endforeach()
add_custom_target(focused_patched ALL DEPENDS ${patched})
add_dependencies(libs focused_patched)
set -eu
layer=$1
build=/evidence/build
LD_LIBRARY_PATH=$build:$build/kernel:$build/libressl:$build/libressl3 ctest --test-dir $build -R '^(guest_libressl|guest_crypto_memcmp)' -E '(_patched|_nid)$' --output-on-failure --no-tests=error > /evidence/$layer-native.log 2>&1
LD_LIBRARY_PATH=$build/patched ctest --test-dir $build -R '^guest_libressl_((bio|cmac)_patched|protocol_nid)$' --output-on-failure --no-tests=error > /evidence/$layer-patched.log 2>&1
python3 /src/tools/check_test_registration.py --list $build > /evidence/$layer-registrations.txt
ninja -C $build -t commands libressl/libSceLibreSsl.prx libressl3/libSceLibreSsl3.prx > /evidence/$layer-runtime-commands.txt
! grep -q GenerateErrorStrings.py /evidence/$layer-runtime-commands.txt
test "$(grep -c -- '-c /src/core/libs/prx/libSceLibreSsl/src/Error.cpp' /evidence/$layer-runtime-commands.txt)" = 1
sha256sum $build/prx/libSceLibreSsl/ErrorStrings.inc > /evidence/$layer-fixture.log
rm $build/prx/libSceLibreSsl/ErrorStrings.inc
cmake --build $build --target libSceLibreSsl libSceLibreSsl3 >> /evidence/$layer-fixture.log 2>&1
test ! -e $build/prx/libSceLibreSsl/ErrorStrings.inc
cmake --build $build --target guest_libressl_error_string_tests >> /evidence/$layer-fixture.log 2>&1
sha256sum $build/prx/libSceLibreSsl/ErrorStrings.inc >> /evidence/$layer-fixture.log
LD_LIBRARY_PATH=$build:$build/kernel:$build/libressl:$build/libressl3 ctest --test-dir $build -R '^guest_libressl_(errors|free_strings|free_strings_first)$' --output-on-failure --no-tests=error >> /evidence/$layer-fixture.log 2>&1
tail -5 /evidence/$layer-native.log
tail -5 /evidence/$layer-patched.log

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 rebase label 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.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
@oneandonlydean oneandonlydean closed this pull request by merging all changes into boykopovar:main in b9cd424 Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants