feat(libSceLibreSsl): implement five custom UI method functions #9942
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9942"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by GabrielKLBr on 2026-10-22T22:59:50Z.
What
Implement five previously throwing exports in
libSceLibreSsl:UI_create_methodtq1e1kFa2s8UI_destroy_methodL6H3T7sBP5UUI_method_set_opener1OlYGRE3vcYUI_method_get_openerFAKxcUW+PqkUI_method_set_writeruQ4HFlHUJy0Implementation
Methods own a copied optional name and initially empty callback slots. Setters store, replace or clear guest System V callback pointers without invoking them; the opener getter returns the stored pointer. Null setters return -1 and a null opener query returns null. Destruction releases the name and method. A failed method allocation returns null. In LibreSSL 2.5.4, a failed name copy still returns the allocated, usable method with a null name; the implementation and allocation-failure tests preserve that behavior. Null destruction throws through
NotImplemented_nid_no_patchrather than reproducing the reference's invalid dereference.No new third-party dependency or additional exported symbol is introduced. Existing export names and NIDs stay unchanged. The 56-byte reference layout and callback offsets have compile-time checks.
Evidence
tools/nid_names.py's algorithm.Technical debt
docs/dev/debt/libSceLibreSsl.mdrecords the unmeasured PS5 UI signatures/layout/behavior, the deliberate null-destruction throw, and the remaining allocator/consumer integration limitations. The wholly unknown export count changes from 377 to 372 after rebasing onto the merged digest implementation (#9025). Other UI exports retain their throwing behavior.Selection and overlap
A source-tree scan enumerated libraries with at least five actual throwing exports. Investigated candidates included libkernel_sys, libScePosixForWebKit, libSceCesCs, libSceUlt, libSceNet, libSceHttp, libSceSsl, libSceAudioPropagation, libSceFontFt, libSceRudp, libSceUsbd and libSceVorbisDec. Existing implementations in open PRs, unresolved contracts, title-shipped wrapper restrictions and scope removed those candidates.
secrets.choicewas used on the qualified set, which contained only libSceLibreSsl; this was not a multi-library lottery.The official authenticated overlap checker completed successfully against
mainat24c6cc33f090296ab90dc154abdfb9ef548fc923, with no shared exports. It reports a textual test-registration conflict with #9355; neither change builds on the other. When either lands, preserve both test blocks while rebasing the other. Several older PRs already conflict with main, so their shared CMake/source/debt files cannot be compared automatically. I inspected the affected CMake additions for UI test target collisions and verified that all five UI functions remain throwing stubs in #9033, #9041, #9047, #9446, #9448, #9529, #9571, #9745 and #9870. The same functions were absent from the inspected patches of the 15 relevant LibreSSL PRs in the initial 1,290-PR inventory. No other contributor was messaged.This branch incorporates #9025's existing digest code through main; the PR itself still implements exactly five UI exports in one library. The debt-count conflict from that merge was resolved by preserving its digest entry and subtracting five from 377. There is no pending implementation dependency. Shared includes/count lines can need textual rebases whichever independent LibreSSL PR lands first.
Tested
Linux Mint 22.3 x86-64, GCC/G++ 13.3.0, CMake 3.28.3, Ninja 1.11.1, Python 3.12.3, Release and
BUILD_TESTING=ON.PATH=/home/gabri/.local/share/anyps5-tools/usr/bin:$PATH cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DBUILD_TESTING=ON -DCMAKE_PREFIX_PATH=/home/gabri/.local/share/anyps5-tools/usr— passed.CPATH=/home/gabri/.local/share/anyps5-tools/usr/include cmake --build build --parallel 8— passed, exit 0.CPATH=/home/gabri/.local/share/anyps5-tools/usr/include cmake --build build --target libs --parallel 8— passed, exit 0.ctest --test-dir build -R '^guest_libressl_ui' --output-on-failure— both new tests passed, 0.14 seconds total in the final focused run.PATH=/home/gabri/.local/share/anyps5-tools/usr/bin:$PATH VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.json CTEST_PARALLEL_LEVEL=4 ctest --test-dir build --output-on-failure— exit 0, 1,764 passed, 85 skipped, 0 failed out of 1,849; 88.03 seconds on final commita12622b6e42b5a1359aba721e8106955d65917ee(base24c6cc33f090296ab90dc154abdfb9ef548fc923). llvmpipe/LLVM 20.1.2, Mesa 25.2.8; unsupported feature/display tests skipped.shader_cache_runtime_sourcesfailed because my runner PATH omitted local Ninja; correcting PATH fixed it. Eight graphics tests failed on AMD Radeon RX 580 2048SP / RADV POLARIS10, Mesa 25.2.8, with numerical/sample-location differences or guest-memory import unavailable (/dev/udmabufpermission denied). No permissions were changed and these GPU failures are not claimed fixed.PATH=/home/gabri/.local/share/anyps5-tools/usr/bin:$PATH VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.json CTEST_PARALLEL_LEVEL=4 ctest --test-dir build --rerun-failed --output-on-failure— exit 0, 8 passed and 1 feature skip; 7.78 seconds.python3 tools/check_conventions.py --base upstream/main— passed without findings. Legacy--base origin/mainalso passed.PATH=/home/gabri/.local/share/anyps5-tools/usr/bin:$PATH python3 tools/check_compile.py --build build --jobs 2 --base upstream/main— 2 changed translation units compile.git diff --check upstream/main...HEAD— clean; final working tree clean.These are local host tests. No PS5, title or homebrew was tested. Compiler/linker warnings observed were in unchanged kernel, graphics and glslang sources.
Local dependencies added: official Ubuntu
ninja-build,gh,libxrandr-dev,libxext-dev,libxrender-dev,libpthread-stubs0-dev, unpacked to a user-owned prefix because system installation needs a password. Git was unchanged. Default submodules initialized recursively; no new repository dependency.python3 tools/pr_overlap.py --repo boykopovar/AnyPS5 --branch feat/libressl-five-ui-functions --jobs 2— passed, exit 0, using the existing authorized Git credential without exposing or storing it. Output and manual follow-up are summarized above. The initial unauthenticated CLI attempt failed; an anonymous public-API run completed, a later anonymous refresh hit the rate limit, and the final authenticated run completed normally.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T05:45:03Z.
Review: APPROVED
Reviewed exact head
a12622b6e42b5a1359aba721e8106955d65917eeagainst current main0db47b263d1019043f7d28fad4e7ee0a1ea5ec6a. Current-maingit diff --checkand conventions pass. The PR reports focused UI tests, allocation-failure and sanitizer checks, successful patched-NID loading, and a full lavapipe suite (1,764 pass, 85 skipped); I did not rerun the C++ suite locally. The PS5 UI ABI/behavior is explicitly recorded as unmeasured, and the implementation follows the pinned LibreSSL 2.5.4 reference while preserving the documented null-destroy difference. Current-main sync is clean; onlycore/libs/CMakeLists.txtchanged on both sides, so preserve this UI test registration when resolving it. I found no overlapping implementation of these five exports in the current open PRs or a substantive defect in the reviewed code/evidence.Pull request closed