Skip to content

feat(libSceLibreSsl): return the measured version from SSLeay - #9745

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
KernelPanicNT:feat/libressl-ssleay-version
Oct 26, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
KernelPanicNT:feat/libressl-ssleay-version

Conversation

@KernelPanicNT

@KernelPanicNT KernelPanicNT commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What

Source of the behaviour.

SSLeay() in libSceLibreSsl now returns 0x20000000. On main it is one of the throwing stubs (Export.cpp L1629-L1632). The function takes no argument and reads no state, so this is its whole behaviour for every call. tools/progress.py lists it as a constant return; the constant is the measured one.

Changes:

How this fits with #8981: the maintainers have not chosen yet between a LibreSSL submodule and hand-written exports. This change does not depend on that choice. A submodule build at 2.5.4 or 4.0.0 returns the same constant from SSLeay, so the function and the test stay valid either way. If a submodule lands first, SSLeay_nid_postfix can forward to it, and the test can stay as it is.

Merge order with the open LibreSSL pull requests. #9025, #9033, #9041, #9043, #9047, #9446, #9448, #9529 and #9571 share this change's new core/libs/prx/libSceLibreSsl/CMakeLists.txt (all but #9571) and the count line of docs/dev/debt/libSceLibreSsl.md (all nine). There is no dependency in either direction: none of them needs SSLeay, and this change needs nothing from them. Whichever of them lands first, this pull request rebases on it, keeps its add_test blocks and source list, and lowers the count from the new value; it does not ask any of them to wait. The conflict is text only, and none of them changes SSLeay. #9535 and #9536 also edit Export.cpp and the debt file, in other functions and other lines, and do not create this CMakeLists.txt; the same applies to them.

Unblocks: none. No title is known to call SSLeay. The measurement was taken inside Gran Turismo 7 (PPSA01317), but that only means the module loads there, not that the game calls this export.

Tested

Linux x86-64 (GitHub Codespace, 4 cores, AMD EPYC 7763), this branch deff17579 rebased on main cbcb08308, built with BUILD_TESTING=ON. No title.

  • guest_libressl_version_tests: passed 5 times out of 5.
  • Negative control: with core/libs/prx/libSceLibreSsl/Export.cpp restored from main and rebuilt, the test aborts with what(): SSLeay_nid_postfix not implemented. With the change back, it passes 5 times out of 5.
  • tools/progress.py of main cbcb08308 against this branch: +1 implemented function (SSLeay_nid_postfix), 4835/11180 to 4836/11180.
  • python3 tools/check_conventions.py --base origin/main: all checks passed. git diff --check: clean.

Duplicate and overlap check

python3 tools/pr_overlap.py --branch feat/libressl-ssleay-version lists #9025, #9033, #9041, #9043, #9047, #9446, #9448 and #9529 (each creates core/libs/prx/libSceLibreSsl/CMakeLists.txt and edits the count line of docs/dev/debt/libSceLibreSsl.md) and #9571 (count line only). No shared exports. These are the text conflicts described above; none of them touches SSLeay.

Searches of open and closed pull requests for SSLeay (title, body, and the diffs of the 12 open libSceLibreSsl and libSceLibreSsl3 pull requests: #8956, #9025, #9033, #9041, #9043, #9047, #9446, #9448, #9529, #9535, #9536, #9571) find none that implements it. Searched again on 2026-10-22 up to #9732.

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 (no order needed in either direction with the open LibreSSL pull requests; see the merge order note above)
  • Fixes: none
  • Unblocks: none (no title is known to call SSLeay)
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Progress report (9656d36 → 601226d)

📈 System libraries: 51.01% (+0.01%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceLibreSsl SSLeay_nid_postfix
⚪ 1 behaviourally empty (constant return or throw)
Library Name
libSceLibreSsl SSLeay_nid_postfix

Changed libraries (implemented exports)

Library Before After Change
libSceLibreSsl 55/399 (13.78%) 56/399 (14.04%) +0.25 pp

@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 constant is supported by the firmware 13.40 measurement cited here, and I found no competing implementation of SSLeay. The PR also identifies shared CMake/debt-file edits with the other open LibreSSL PRs; record the agreed merge order/dependency as required by the repository overlap rule before merge.

I’ve noticed that holding this PR because of #5239 isn’t necessary. It’s fine for PRs to keep coming in; they’ll be handled in due course. Please disregard my earlier request to hold or defer it.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

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 10078 core/libs/prx/libSceLibreSsl/CMakeLists.txt L121
docs/dev/debt/libSceLibreSsl.md L5
PR 10395 docs/dev/debt/libSceLibreSsl.md L5
PR 10834 docs/dev/debt/libSceLibreSsl.md L5
PR 10878 docs/dev/debt/libSceLibreSsl.md L5
PR 10915 docs/dev/debt/libSceLibreSsl.md L5

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 9446 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9448 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 9536 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9571 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10248 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10373 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10376 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10418 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10447 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10448 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10449 core/libs/prx/libSceLibreSsl/CMakeLists.txt
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/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10478 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10481 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10482 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10483 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10485 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10486 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10488 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10508 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10570 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10571 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11003 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11050 docs/dev/debt/libSceLibreSsl.md
PR 11089 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11100 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11105 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11128 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11129 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11138 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11143 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11146 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11151 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11175 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11176 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11189 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11261 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 11359 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md

@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 reported SSLeay() value is supported by the firmware measurement and LibreSSL source cited in the description, and the constant-return implementation and repeat-call assertion are appropriately scoped. I checked the current PR head f3c4ebe33e789b72b5cc921ea88f61849862fd76 against current main b7d1d47a5f: merge-tree and git diff --check are clean, and python3 tools/check_conventions.py --base upstream/main --head upstream/pr/9745 passes.

Please update this branch from current main and refresh the focused test result before merge. The report's test run is on main 4777caca3 / PR commit f3c4ebe33, while the PR is now 54 commits behind current main. I could not rerun guest_libressl_version locally: this checkout has no configured CMake/CTest build, and the filesystem has only about 760 MB free. Current hosted product-test jobs are skipped; the green hosted checks are eligibility, conventions, intake, labels and report.

There is also an overlap-rule item to resolve. The current open LibreSSL work includes #9025, #9033, #9041, #9043, #9047, #9446, #9448, #9529, #9535, #9536 and #9571; the newer #9535/#9536/#9571 stacks also edit Export.cpp and the debt inventory. Please coordinate an order with the affected authors and update Depends on as required by CONTRIBUTING.md. The description currently lists only some of these overlaps and says Depends on: none without documenting the ordering agreement. No duplicate SSLeay implementation was found in the reviewed PR bodies/diffs.

I did not run the project test locally. The PR's reported 5/5 focused runs and negative control are author-reported, not results from this review.

@MarcZX10

Copy link
Copy Markdown
Contributor

I’ve noticed that my earlier request to hold this PR based on #5239 was unnecessary. It’s fine to keep submitting PRs; maintainers will handle them in due course. Please disregard that request.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 22, 2026
@adriadam10 adriadam10 self-assigned this Oct 26, 2026
@adriadam10
adriadam10 force-pushed the feat/libressl-ssleay-version branch from deff175 to 033706c Compare October 26, 2026 10:23
@adriadam10
adriadam10 dismissed MarcZX10’s stale review October 26, 2026 10:24

Dismissing a stale review: the requested changes were addressed after it (new head) and the merge queue blocks on it. Please request changes again if anything is still open.

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

Copy link
Copy Markdown
Contributor

Windows run of this head 033706cbff1, merged onto main 4b1a9a3b2f5 (clean merge, local only), with the selection CI's skipped Windows product job uses: Windows 11, Ryzen 7 5800X, RTX 3080, WinLibs GCC 15.2, Release, BUILD_TESTING=ON. The tree was configured fresh after the merge, then select_tests.py select / ninja -f select.ninja selected / --target libs / select_tests.py ctest --parallel 4 --timeout 120.

  • Selected 1,305 tests: 1,296 pass, 1 fails, pr_overlap_encoding, which also fails on 4b1a9a3b2f5 itself on this machine, 8 skip. No failures from this PR.
  • guest_fopen_errors skips itself here because creating symbolic links needs Developer Mode or administrator rights on this machine; it does the same on main, and CI's Windows runners have the rights.
  • The new guest_libressl_version passes.

AI-assisted: yes (Claude Code)

SSLeay() returns 0x20000000, the value measured on a PS5 with firmware
13.40 and the SSLEAY_VERSION_NUMBER of LibreSSL 2.5.4, which the module
is. The guest_libressl_version test checks it.
@adriadam10
adriadam10 force-pushed the feat/libressl-ssleay-version branch from 033706c to 601226d Compare October 26, 2026 13:50
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 26, 2026
@adriadam10
adriadam10 merged commit 7124e8f into boykopovar:main Oct 26, 2026
10 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Rebased onto current main and resolved the conflict in core/libs/prx/libSceLibreSsl/CMakeLists.txt: main now ends with the Alert test block, and the guest_libressl_version block follows it.
Also changed by us:

  • docs/dev/debt/libSceLibreSsl.md: the pending export count goes from 341 (already on main) to 340, since SSLeay no longer throws.
    Scoped build and ctest of the rebased branch in libs and libSceLibreSsl: 178 of 178 pass.

@KernelPanicNT
KernelPanicNT deleted the feat/libressl-ssleay-version branch October 27, 2026 19:20
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.

4 participants