Repository navigation
feat(libSceLibreSsl3): implement session time and version accessors - #15119
oneandonlydean merged 4 commits into
Conversation
Progress report (5637403 → 9ce9113)📈 System libraries: 30.38% (+0.01%, +3 implemented functions) ✅ 3 implemented
Changed libraries (implemented exports)
|
BunnyFl
left a comment
There was a problem hiding this comment.
Looks right, and the layout matches the PS5 module, not only LibreSSL 4.0.0. Firmware 13.42's system/common/lib/libSceLibreSsl3.sprx (sha256 ee2c529c87fe21b7ef1e5f13d10c47ee90944f52a1f848fe0995e031817c2c3a), disassembly only. These are the whole functions:
f2130: SSL_SESSION_get_timeout (0JcHkrKJ9iw)
f2130: test %rdi,%rdi ; je f213d null -> 0
f2135: mov 0xa8(%rdi),%rax ; ret 64-bit at 168
f2150: SSL_SESSION_set_time (XG3hIzt9VXY)
f2150: test %rdi,%rdi ; je f2160 null -> 0
f2155: mov %rsi,%rax
f2158: mov %rsi,0xb0(%rdi) ; ret 64-bit store at 176, returns the new time
f2170: SSL_SESSION_get_protocol_version (0BW+8jTsY54)
f2170: mov (%rdi),%eax ; ret 32-bit at 0, no null check
So the offsets, the null results, the return of set_time and the 32-bit version read all match. The null protocol-version throw stands in for a console fault, as the entry says.
Tested natively on Windows 11, WinLibs GCC 15.2.0 (not Wine), with this head merged onto main: guest_libressl3_session_metadata and public_headers pass. With main's AdditionalExports.cpp and Api.hpp, the new test doesn't compile against the old parameterless stubs.
Non-blocking: the debt entry says "console layout/revision ... are unverified". The listing above settles the three fields for 13.42, so that part could narrow to what's still open: lifecycle interoperability, resumption, serialization and expiry.
BunnyFl
left a comment
There was a problem hiding this comment.
Re-checked at f3bbebc3e8: the only change is the debt wording, and the new "Session metadata fields" entry states my 13.42 reading correctly (0xf2130 64-bit read at 168 with null giving 0, 0xf2150 64-bit store at 176 returning the time with null giving 0, 0xf2170 32-bit read at 0 with no null check). check_conventions.py passes at this head.
f3bbebc to
521ec17
Compare
521ec17 to
1f3df99
Compare
|
Hi @atharvjairath, we merged current main into this branch (merge commit 24d1fb6) to clear conflicts in docs/dev/debt/libSceLibreSsl3.md with the LibreSSL exports that landed (RSA_get0_factors/crt_params and others): Additional exports are now 170 (160 named) and the NID-names line reads 110 of the 126. Thanks! |
Keeps the session metadata test target beside the TLS protocol, RSA setter and pkey query targets from main, and recounts the LibreSSL debt figures for both sets of exports.
|
Hi @atharvjairath, main moved again and conflicted with this PR in the Nothing needs doing on your side. |
What
SSL_SESSION_get_timeout,SSL_SESSION_set_timeandSSL_SESSION_get_protocol_versionnow access the session fields directly. The timeout and time fields preserve signed 64-bit guest values on Windows as well as Linux. The setter writes eight bytes and returns the assigned value. A null timeout or set-time input returns zero. A null version input throws.The selected version, timeout and time offsets are 0, 168 and 176. LibreSSL 2.5.4 has different time-field offsets. BunnyFl reported matching accesses in firmware 13.42 disassembly. Session allocation, serialization, expiry and TLS resumption remain open integration questions. LibreSSL 4.0.0 accessors · Session layout · BunnyFl’s firmware evidence
The prior layout uses offsets 144 and 152 for timeout and time. The reported firmware entries are 0xf2130, 0xf2150 and 0xf2170 respectively. The reviewer also reported native Windows fixture results from an older integration. Contributor report
The source scanner classifies 23/276 bodies as implemented on main and 26/276 on this branch. The difference is the 3 exports above. The scanner classifies source bodies and does not measure firmware compatibility. The additional export inventory has 172 pending entries (162 named, 10 known only by NID).
Integration order is #14992 → #15031 → #15045 → #15119 → #15406. This branch is based directly on main
6d173c1a1978. Each branch keeps its own changes. The order allows the shared CMake registrations and debt counts to be reconciled after each merge.Tested
Validated head
1f3df99f818cagainst main6d173c1a1978.BunnyFl’s earlier review attributed native fixture results to an older commit. The current results above are from the local Linux and Windows PE runs.
Both loader runs printed
session metadata: 7296 cases, 80274 checks.Earlier validation on 521ec17 and the historical commits cited below
Current refreshed head
521ec17923ddf932adbdf44701e15c4d7553a61con frozen maind1ae628bc2f62459cce1e9872ba5632c938c71f2. Only debt documentation conflicted. Every original owned production/API/CMake/fixture addition and deletion is preserved; upstream ASN1_TIME_diff and all main unions remain intact. Prior reviews and CI are pinned to older heads below.-j1), 12/12 passed in 36.61s.d1ae628integration, with full dependency-input equality and hashes retained. They were not rebuilt separately for each of these four PRs. The separate signature integration ran 44 Linux and 14 focused Windows tests; those are not this PR’s suite counts. This refresh does not rerun the separate parent/error-string/packaged protocol-NID groups.These are focused module tests, not independent native Windows, full-product, packaged-module/NID, title/homebrew or physical-console validation. Known unrelated Wine limitations remain unresolved; no assertion, timeout, gate or runtime workaround changed. The default-off oracle was not enabled. Warnings remain. No new native CI result or current approval is inferred from older heads.
Historical native Windows CI job125440772243/run41490727885 audited on main
a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8plus OLD implementation headefef6f4e260633e683b66b4d7d35f6999af59910: 2,010 Passed / 957 Skipped / zero Failed across 2,967 unique rows, 141.61s; all 46 LibreSSL registrations including session metadata passed. Separate full-build/runtime/skip-audit/graph steps were skipped. This pinned native CI unit/runtime evidence does not validate the refreshed head. Original local Linux 43/43 and Windows PE 13/13 at efef/b28 and four rejected external mutation controls remain archived. BunnyFl’s later review approves OLD documentation headf3bbebc3e8629e114cbf61cc1bf44d322ef6f13eand confirms attribution wording/conventions; it is not approval of this rebase. The f3bb Windows check succeeded, but its logs were not audited here and no additional runtime coverage is claimed.Receipts:
/private/tmp/anyps5-advance-20261103-0127/conflict-refresh/15119and the sharedvalidation-evidence.tar.gz,common-input-equality.json,heads-rebased.json,manual-shared-review.txt,peers-finaland reproducible harness/scripts. Previous local/native evidence remains in the linked Nov2 receipts with its original pins.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Overlap report before the branch refresh was pushed
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.
main)docs/dev/debt/libSceLibreSsl3.mdL35, L215docs/dev/debt/libSceLibreSsl3.mdL35docs/dev/debt/libSceLibreSsl3.mdL35docs/dev/debt/libSceLibreSsl3.mdL35, L215docs/dev/debt/libSceLibreSsl3.mdL32, L35, L215SSL_SESSION_get_protocol_versionSSL_SESSION_get_timeoutSSL_SESSION_set_timecore/libs/prx/libSceLibreSsl3/src/SessionMetadata.cppcore/libs/prx/libSceLibreSsl3/tests/SessionMetadata.cppdocs/dev/debt/libSceLibreSsl3.mdL35core/libs/prx/libSceLibreSsl3/AdditionalExports.cppL218-225core/libs/prx/libSceLibreSsl3/include/Api.hppL183-184docs/dev/debt/libSceLibreSsl3.mdL35docs/dev/debt/libSceLibreSsl3.mdL35, L215docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL35docs/dev/debt/libSceLibreSsl3.mdL35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL35docs/dev/debt/libSceLibreSsl3.mdL35docs/dev/debt/libSceLibreSsl3.mdL35Some 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.
core/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mddocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppcore/libs/prx/libSceLibreSsl3/src/SessionMetadata.cppcore/libs/prx/libSceLibreSsl3/tests/SessionMetadata.cppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txt