feat(libSceLibreSsl): implement UI_get0_user_data, UI_get_string_type and UI_get_input_flags #10486
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10486"
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 alvaroelpob on 2026-10-24T03:09:16Z.
What
Implements
UI_get0_user_data,UI_get_string_typeandUI_get_input_flagsin libSceLibreSsl, which threw and were declared without parameters.The module is LibreSSL 2.5.4 (firmware 13.40 measurements in #8981). Signatures, layouts and results follow that release's
ui.h,ui_locl.handui_lib.c:void* UI_get0_user_data(UI*)user_dataint UI_get_string_type(UI_STRING*)UIT_NONE(0) for a null string, otherwisetypeint UI_get_input_flags(UI_STRING*)input_flagsThe layouts are 40 bytes for
UI(user_dataat 16) and 64 forUI_STRING(typeat 0,input_flagsat 16,flagsat 56). They were checked withstatic_asserts and againstoffsetoffrom the 2.5.4 headers compiled on x86-64. LibreSSL dereferences a null UI inUI_get0_user_datawithout checking it, so that throws. No export of this module creates a UI or a UI string yet, so for now only ones built by the caller reach these functions.The
UI_METHODfunctions from #10376 are insrc/Ui.cpponmain. This PR uses its own file and struct names.The debt entry records the source and what is unverified, and the pending-export count drops from 357 to 354.
Tested
Ubuntu 26.04 (WSL2, kernel 6.18), GCC 15.2.0, Release, full build with
BUILD_TESTING=ONonmain379b1dca3. There is one commit per function, and each adds that function with its test block and debt update. Each was built and itsguest_libressl_ui_stringtest andcheck_conventions.pyrun on its own.guest_libressl_ui_stringtest.UI_get0_user_datareturns null and then the user data, notstrings, and throws for a null UI.UI_get_string_typereturns 0 for a null string and for a zeroed one, then types 1 to 5 withinput_flagsandflagsset.UI_get_input_flagsreturns 0 for a null string and for a zeroed one, then 0x01, 0x8001 and -1 withtypeandflagsset.ctest -j16at the last commit: 2004/2006 pass.agc_driver_multisample_retirementfails the same way onmainon this machine.agc_driver_sgpr_pattern_fill_keysfailed under the full-j16run and passed in 3 of 3 runs on its own and with the other 83agc_driver_s*tests. It is an AGC test this change doesn't touch.main1e740a23a3(after #9033), head d78a917a9a: the conflicts were only theadd_librarysource list, the end of the test block, the pending-export count and the last debt entry; both sides are kept and the count is 357 minus this PR's exports. Full build andctest -j16: 2043/2044 pass;agc_driver_multisample_retirementfails the same way on thatmain.check_conventions.py --base upstream/mainpasses.maine7e3e9c198, head ef8ecac436, to resolve the conflict from #9529 on the sharedCMakeLists.txtand debt-file lines; both sides are kept and the count is 353 minus this PR's exports. ef8ecac436 (refactor(libSceLibreSsl): declare the UI_STRING exports in the public header) puts the real signatures and their structs inlibSceLibreSsl/include/Api.hppand drops the test's redeclarations, whichpublic_headersrequires since #10706. Full build andctest -j16: 2202/2203 pass;agc_driver_multisample_retirementfails the same way on thatmain.check_conventions.py --base upstream/mainpasses.mainae7d59258e(after #9949), head a98077a387, to resolve the conflicts withmainon the sharedCMakeLists.txtand debt-file lines; both sides are kept and the count is 342 minus this PR's exports. Full build andctest -j16: 2275/2276 pass;agc_driver_multisample_retirementfails the same way on thatmain.check_conventions.py --base upstream/mainpasses.main2dbe9b99f5(after #9745, #9870 and #11111), head d89d7c42b5, to resolve the conflicts withmainon the sharedCMakeLists.txtand debt-file lines; both sides are kept and the count is 340 minus this PR's exports. Full build andctest -j16: 2370/2371 pass;agc_driver_multisample_retirementfails the same way on thatmain.check_conventions.py --base upstream/mainpasses.main88795ed448(after #10248; head c6fc64e19a) to resolve the conflicts on the shared debt-file lines; both sides are kept and the count is 335 minus this PR's exports. Full build andctest -j16: 2383/2384 pass;agc_driver_multisample_retirementfails the same way on thatmain.check_conventions.py --base upstream/mainpasses.mainc7b4878fa8(after #10373, #10376 and #10449), head ce1a4efc46, to resolve the conflicts withmainon the sharedCMakeLists.txt,Api.hppand debt-file lines; both sides are kept and the count is 319 minus this PR's exports. Full build andctest -j16: 2394/2395 pass;agc_driver_multisample_retirementfails the same way on thatmain.check_conventions.py --base upstream/mainpasses.main474030e584(after #13562), head b6d7d80499, to resolve the conflict on the pending-export count in the debt file; the count is 292 minus this PR's exports. Full build andctest -j16: 3062/3062 pass.check_conventions.py --base upstream/mainpasses.maincf79276fee(after #13820), head 98db0fc750, to resolve the conflict on the pending-export count in the debt file.mainstill says 292 although #13820 removed two stubs, leaving 290, so the count is now set to the 287 stubs left inExport.cpp. It also restores the PS5 3.20 export table link,b2a77c09cd71c01f34c790cfbe98c751a13262ad, which the previous rebase had written without its zeros. Full build andctest -j16: 3107/3107 pass (log_filefailed once on #10486 and passed on five reruns and a second full run).check_conventions.py --base upstream/mainpasses.main4939814d79(after #9970, #10078 and #10488), head 3579c94f50, to resolve the conflicts on the sharedCMakeLists.txt,Export.cpp,Api.hppand debt-file lines; both sides are kept. The count is set to the 258 stubs left inExport.cpp. Full build andctest -j16: 3538/3538 pass.check_conventions.py --base upstream/mainpasses.main4f41f4c375, head 326a5c6bac, to resolve the conflicts on the sharedCMakeLists.txt,Export.cppand debt-file lines; both sides are kept and the debt count is recomputed fromExport.cpp. Full build andctest -j16: 3796/3800 pass;guest_sce_net,guest_poll,guest_select_waitandguest_memoryfailed under that load, pass when run alone, andmain4f41f4c375passes all 3799 with-j16on the same machine.check_conventions.py --base upstream/mainpasses.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 copilot-pull-request-reviewer[bot] on 2026-10-24T03:11:00Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T12:15:51Z.
Review: APPROVED
Reviewed head
c80312ff0b91d65169288cad4419f5ecd692ae10.I checked the UI and UI_STRING layouts and all three accessor behaviors:
UI_get0_user_datareturns the user-data field, while the string accessors return the requested field and the documented null-string defaults. The tests exercise field selection, nulls, and unrelated fields. I found no blocking correctness issue in the reviewed diff.The PR reports focused tests and a 2004/2006 full CTest run, including a separate intermittent AGC test failure that passed in its focused reruns and also fails on main; I did not reproduce those runs locally. Current convention, labels, eligibility, and report checks pass. Linux, Windows, register-context, relinker, write-watch, and ASan jobs are skipped.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T08:59:28Z.
Review: DISMISSED
Re-check — changes requested\n\nThe new report is useful: it says the implementation functions were preserved through the merge and the full test suite has the same single known failure as its tested main, with conventions passing. However, the tested integration point is
4c7d275bef; current upstream main isaaccd0ba39, and this PR head is 44 commits behind it.\n\nPlease update onto current main, preserve the implementation and debt-count changes, recount the pending exports against the resulting Export.cpp, and rerun the relevant LibreSSL tests plus conventions on the exact updated head. The earlier approval was for the prior head and does not cover this stale integration point. I did not rerun these checks locally.