Repository navigation
feat(libSceLibreSsl3): return from the error-string and digest loaders - #17246
oneandonlydean merged 39 commits into
Conversation
Progress report (bf02f97 → 32c166e)📈 System libraries: 42.03% (+0.01%, +3 implemented functions) ✅ 3 implemented
⚪ 3 behaviourally empty (constant return or throw)
Changed libraries (implemented exports)
|
8d21f0c to
cccda26
Compare
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
gabichuuuuu
left a comment
There was a problem hiding this comment.
Read against the LibreSSL in 3rdparty/libressl-openbsd (078b3d1d), which is what this module follows. I haven't built or run this branch.
The three functions are empty bodies. In LibreSSL they do work. ERR_load_X509_strings and ERR_load_PEM_strings register the reason strings (x509/x509_err.c, pem/pem_err.c). OpenSSL_add_all_digests registers the digests that EVP_get_digestbyname looks up (evp/c_all.c).
Returning without doing either is a silent stub, which CONTRIBUTING doesn't allow unless the debt file lists it under Silent stubs.
- If the module's error strings and digest lookup don't depend on registration, because the tables are always populated, the debt entry should say that and point to where.
- Otherwise these should throw until registration exists.
Debt file: compared with main, this branch's docs/dev/debt/libSceLibreSsl3.md drops a BIO_meth line that main now has (src/BioMethod.cpp, #15761), and it repeats the new bullet on two consecutive lines. It looks rebased from an older copy of the file.
cccda26 to
60643e4
Compare
|
Both points addressed in 60643e4.
Tested on Linux x86-64, Release, |
|
@fishingpvalues, a heads-up on overlap: #15591 (open since 2026-11-03) implements the same three exports, together with four The two differ in behaviour. Here, A lone Whichever merges second will conflict on these lines. Also, if #15591 merges first, this PR's test, which expects the first two to throw, would fail. Could we agree on an order? If you're happy for #15591 to go first, this PR could drop the three, or depend on it with AI-assisted: yes. |
60643e4 to
cccda26
Compare
Firmware 13.42 gives each of the three a lone `ret` body, and LibreSSL declares them `void (void)`; they load nothing here because no table they fill is modelled.
cccda26 to
7e9ad1b
Compare
|
Thanks — the firmware evidence settles it, and I have no evidence the loaders do more than return. All three are Changed in
Order: this PR is three one-line bodies plus a focused test and a debt entry, so it is cheapest to merge first and let #15591 drop three duplicated lines. If you would rather #15591 went first, say so and I will rebase this down to the test and the debt entry only — Tested: |
|
Addressed in
Tested on Linux x86-64, Release,
Windows, a console and titles were not run. |
|
Merged
Tested on Linux x86-64, Release,
Windows, a console and titles were not run. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@fishingpvalues, thanks for checking the firmware and for rebuilding the debt entry. Agreed: this PR goes first. #15591 no longer touches the three loaders. At its head
AI-assisted: yes. |
|
Re-checked at Updated the description to match #15591 at Linux x86-64, Release,
Windows CI passed; all completed checks green. AI-assisted: yes. |
…string-loaders * origin/main: (40 commits) fix(libkernel): guard pthread create guest name (boykopovar#18547) fix(libc): guard backtrace guest outputs (boykopovar#18537) fix(tools): reject duplicate advisor JSON keys (boykopovar#17990) fix(libc): compute exp2l with FreeBSD msun's ld80 code as the bundled libc.prx does (boykopovar#11266) feat(libSceNKWebKit): implement PAL::fileSizeDescription (boykopovar#19460) feat(libSceNpMatching2): answer 29 calls before initialization as firmware 13.42 does fix(libSceNetCtl): keep errno across the host interface query fix(libkernel): drop a datagram whose receive faulted on macOS docs(libSceSystemLogger2): record the silent Terminate stub and shorten the debt entry feat(libSceRegMgr): implement the removed-range key calls as firmware 13.42 does feat(libSceSystemLogger2): implement the lifecycle, timestamp and event validation feat(libSceNpCppWebApi): return the Matchmaking string members by address ci: re-run checks (output_fifo_macos fix landed on main as 584b350 via boykopovar#19406) fix(libc): preserve internal C++ assertion diagnostics fix(libSceUsbd): copy lists, timeouts, and descriptors via GuestCopyIn/Out feat(libSceKeyboard): forward the debug init, open and close calls as firmware 13.42 does fix(libSceCesCs): copy profile sheets and contexts via GuestCopyIn/Out fix(libc): keep the guest heap alive through static finalization fix(libSceRtc): copy parse inputs via GuestCopyIn/Out and preserve errno fix(libSceNKWebKit): run a permission request's decision handler once with libc++ ... # Conflicts: # core/libs/prx/libSceLibreSsl3/CMakeLists.txt
|
The three no-op loaders look right, but the CMakeLists.txt in this head drops three things that main still has, which looks like a merge-main slip: the |
|
The CMake registrations are back, thanks to your last commit. One more thing: the new debt entry mentioned EVP_get_digestbyname in its text, and a fragment already on main changes the entry by that name, so the debt fold check matched two entries and failed. I pushed 74bb3b0, which rewords that sentence ("the digest lookup by name uses the static table"). No change is needed from you. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Head 74bb3b04c4f4b31513c4795510ec52886c45df6e, base main. No build and no test run here. I read the diff for all six files and searched the repository at the head with the reader (repo_read.py search and repo_read.py cat).
Results
| Check | Result | Note |
|---|---|---|
| Loader declarations and definitions match | passed | Header, src/ErrorStringLoaders.cpp and the test agree |
| Other references to the three loaders | passed | Only the header, the new source, the test and the debt doc |
| Doc claims about existing code | passed | DigestNames.cpp, Export.cpp and ErrorStrings.cpp do what the doc says |
| Build and CTest of the new target | not run | The author reports a pass; I did not repeat it |
tools/check_conventions.py |
not run | The author reports a pass; I did not repeat it |
Findings
Blocking
None.
Non-blocking
docs/dev/debt/libSceLibreSsl3.md:10: the entry sits under### Functional(heading at line 8). The house rule inCONTRIBUTING.mdand the PR checklist put silent stubs under Silent stubs. These loaders are silent no-ops, so the entry belongs there. The PR checklist line "silent stubs are listed under Silent stubs" is therefore not met as written.core/libs/prx/libSceLibreSsl3/tests/ErrorStringLoaders.cpp:23: the test only checks that the digest lookup returns the same pointer before and after the loader calls. It does not check anything the loaders do, so it would pass if they did nothing at all. It only shows that calling them does not crash.
Not verified
- The build and the CTest target are not run here. The author-reported pass is not something I performed.
- The description says this PR edits the
Additional exportscount line in the debt doc. The diff shows no change to a count line. I did not confirm whether the count needs updating. - Export binding: I checked that no other source names the three loaders. I did not check how the export table is generated from
AdditionalExports.cppandApi.hpp. - The firmware 13.42 disassembly claims (
0xc37b0,0x989d0,0x10100) are not verified. Nothing here runs on a console. - The
Silent stubsheading in the debt doc was not located in the lines I read. - Files read:
ErrorStringLoaders.cppandtests/ErrorStringLoaders.cpp(new files, read in full from the diff); the diffs ofAdditionalExports.cpp,CMakeLists.txt,include/Api.hppanddocs/dev/debt/libSceLibreSsl3.md; the head ofinclude/Api.hpp(lines 1–30),AdditionalExports.cpp(lines 1–20),Export.cpp(lines 20–32) and the debt doc (lines 1–40). Not read in full:AdditionalExports.cpp(219 lines),CMakeLists.txt(934 lines),include/Api.hpp(466 lines) and the debt doc (187 lines).
To get this to a good state
Nothing is required.
Optional:
- Move the
ERR_load_X509_stringsentry from Functional into Silent stubs. - Make the test check something the loaders are meant to do, or say in the test that it only checks for no crash.
What
feat(libSceLibreSsl3): return from the error-string and digest loaders.
ERR_load_X509_strings,ERR_load_PEM_stringsandOpenSSL_add_all_digestsarevoid (void)in LibreSSL, and in firmware 13.42libSceLibreSsl3.sprxeach body is a loneret(0xc37b0,0x989d0and0x10100, read from the disassembly, not run on a console), so they return without loading anything. The implementations live insrc/ErrorStringLoaders.cpp, the exports leaveAdditionalExports.cpp, their declarations becomevoidininclude/Api.hpp, and theSilent stubssection ofdocs/dev/debt/libSceLibreSsl3.mdrecords why the tables they would fill are not modelled.#15591 no longer implements these three: at its head
925b6e1c71it covers only fourSSL_*exports, so this PR goes first. Both PRs still edit theAdditional exportscount line indocs/dev/debt/libSceLibreSsl3.md; if #15591 merges second it will recount that line from the mergedAdditionalExports.cpp. This branch is based onmainbfdb58119e.Tested
Linux x86-64 (Debian 13, glibc 2.41, GCC 14.2.0), Release,
BUILD_TESTING=ON, basemainf9c2d92b91:cmake --build build --target guest_libressl3_error_string_loaders_tests --parallel 8: passed.ctest --test-dir build -R '^guest_libressl3_error_string_loaders$' --output-on-failure: 1/1 passed.python3 tools/check_conventions.py --base origin/main: all checks passed.mainf9c2d92b91and resolved the technical-debt inventory conflicts; rebuilt and reran the test.Checklist
main; mergeable with the current tip; no other open PR implements the same functions (feat(libSceLibreSsl3): return from four calls as firmware 13.42 does #15591 now covers fourSSL_*exports only)NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)