Skip to content

feat(libSceLibreSsl3): implement ECDSA_SIG_get0 - #15449

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
AlexWhitehouse:feat/libressl3-ecdsa-sig-get0
Nov 7, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
AlexWhitehouse:feat/libressl3-ecdsa-sig-get0

Conversation

@AlexWhitehouse

@AlexWhitehouse AlexWhitehouse commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

What

Implements the libSceLibreSsl3 export ECDSA_SIG_get0 (NID z8fsXF8JuL0), which threw through NotImplemented_nid_no_patch.

It is ported from LibreSSL 4.0.0's ecdsa.c, the revision the library already targets, into a new core/libs/prx/libSceLibreSsl3/src/EcdsaSig.cpp. The file starts with ecdsa.c's copyright and licence notice, copied byte for byte.

  • Behaviour: each output pointer is optional, and r is written before s, as upstream does.
  • Null signature: with no outputs requested, the call does nothing. With an output requested, it throws without writing, because upstream would dereference null there.
  • Layout: include/EcdsaSig.hpp holds the 16-byte ECDSA_SIG layout from ecdsa_local.h, with r at offset 0 and s at 8, pinned with static_asserts.
  • Declaration: include/Api.hpp replaces the parameterless stub declaration with the typed one.

Debt (docs/dev/debt/libSceLibreSsl3.md):

Tested

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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Progress report (090f571 → 773e3bf)

📈 System libraries: 31.38% (+0.0026%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceLibreSsl3 ECDSA_SIG_get0_nid_postfix

Changed libraries (implemented exports)

Library Before After Change
libSceLibreSsl3 85/284 (29.93%) 86/284 (30.28%) +0.35%

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 932178e merged onto main 4f41f4c · tested 2026-11-03 11:30 UTC · 15 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 1,143 passed · 6 failed (0 new, 4 also fail on main, 2 unstable on main) · 6 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 1,155 of 3,811 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (549 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.4 s, ⚠️ public_headers 53.2 s, ⚠️ agc_driver_image_sample_unnormalized 42.3 s, ⚠️ agc_driver_sample_multisample_target 36.2 s, ⚠️ agc_driver_stream_copy 34.3 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 7 of the last 9 main runs
agc_driver_store_over_untracked: failed in 1 of the last 9 main runs
Failing on main too (4, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_driver_submit_progress
Validation IDs already present on main (4 IDs in 470 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (470 tests): agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, agc_driver_bindless_images, and 462 more
VUID-vkCmdCopyImage-srcImage-01548 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, agc_driver_stencil_plane_memory
VUID-vkCmdCopyImage-srcImage-01551 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, agc_driver_stencil_plane_memory
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (6)
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
Reproduce
git fetch origin 932178e47c07e33090fbfd790690521c87545dc2 4f41f4c375f5abb487dbd184fbc150f31994d762
git checkout 4f41f4c375f5abb487dbd184fbc150f31994d762 && git merge --no-ff 932178e47c07e33090fbfd790690521c87545dc2
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head bf93f0c merged onto main 04cdd52 · tested 2026-11-05 20:23 UTC · 18 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 1,331 passed · 5 failed (0 new, 5 also fail on main) · 7 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 1,343 of 4,100 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (640 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ public_headers 76.5 s
Failing on main too (5, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_driver_pipeline_journal
agc_driver_submit_progress
Validation IDs already present on main (4 IDs in 552 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (552 tests): agc_driver_address_draw_space_reuse, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 544 more
VUID-vkCmdCopyImage-srcImage-01548 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
Skipped (7)
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_recorded_draw_staging: skipped, the device does not keep host imports write-watched, so the target is never resident
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
Reproduce
git fetch origin bf93f0ce944241ec6cf06ede5f3ca3caa91f2454 04cdd527604d521845afc58f9374afb92ff85f76
git checkout 04cdd527604d521845afc58f9374afb92ff85f76 && git merge --no-ff bf93f0ce944241ec6cf06ede5f3ca3caa91f2454
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 5, 2026
@AlexWhitehouse
AlexWhitehouse force-pushed the feat/libressl3-ecdsa-sig-get0 branch from bf93f0c to 1507baa Compare November 6, 2026 01:15
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 6, 2026
@AlexWhitehouse
AlexWhitehouse force-pushed the feat/libressl3-ecdsa-sig-get0 branch from 1507baa to 0b8b0a2 Compare November 6, 2026 05:04
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 6, 2026
@AlexWhitehouse
AlexWhitehouse force-pushed the feat/libressl3-ecdsa-sig-get0 branch 2 times, most recently from 1e1fe21 to 524f3b2 Compare November 6, 2026 06:51
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 6, 2026
@AlexWhitehouse
AlexWhitehouse force-pushed the feat/libressl3-ecdsa-sig-get0 branch from 524f3b2 to 2b5e825 Compare November 6, 2026 08:03
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 6, 2026
@oneandonlydean oneandonlydean self-assigned this Nov 6, 2026
@AlexWhitehouse
AlexWhitehouse force-pushed the feat/libressl3-ecdsa-sig-get0 branch from 2b5e825 to f802986 Compare November 6, 2026 22:43
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 7, 2026
@AlexWhitehouse
AlexWhitehouse force-pushed the feat/libressl3-ecdsa-sig-get0 branch from f802986 to b676a97 Compare November 7, 2026 00:03
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 7, 2026
@AlexWhitehouse
AlexWhitehouse force-pushed the feat/libressl3-ecdsa-sig-get0 branch from b676a97 to 2e3502d Compare November 7, 2026 01:20
@github-actions

github-actions Bot commented Nov 7, 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 14890 core/libs/prx/libSceLibreSsl3/include/Api.hpp L10
docs/dev/debt/libSceLibreSsl3.md L67
PR 15826 core/libs/prx/libSceLibreSsl3/src/EcdsaSig.cpp
core/libs/prx/libSceLibreSsl3/tests/EcdsaSig.cpp
PR 16654 core/libs/prx/libSceLibreSsl3/CMakeLists.txt L18
PR 16708 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp L569-576
core/libs/prx/libSceLibreSsl3/CMakeLists.txt L18, L78
core/libs/prx/libSceLibreSsl3/include/Api.hpp L380-381
docs/dev/debt/libSceLibreSsl3.md L67, L209-210

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 12315 core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 14212 docs/dev/debt/libSceLibreSsl3.md
PR 14465 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 14499 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 14612 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15163 core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15514 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15591 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15616 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15826 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
core/libs/prx/libSceLibreSsl3/src/EcdsaSig.cpp
core/libs/prx/libSceLibreSsl3/tests/EcdsaSig.cpp
docs/dev/debt/libSceLibreSsl3.md
PR 15831 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15854 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16249 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16255 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16529 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16535 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16543 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16586 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16588 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16589 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16659 core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16689 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16690 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md

@AlexWhitehouse
AlexWhitehouse force-pushed the feat/libressl3-ecdsa-sig-get0 branch from 2e3502d to 08876e8 Compare November 7, 2026 05:10
Port ECDSA_SIG_get0 from LibreSSL 4.0.0 ecdsa.c in a new EcdsaSig.cpp that
carries ecdsa.c's copyright and licence notice: each output pointer is
optional and r is written before s, as upstream does. A null signature
with no outputs does nothing; with an output requested, which upstream
dereferences, it throws without writing. The 16-byte ECDSA_SIG layout from
ecdsa_local.h is pinned by static_asserts.

The additional export inventory is recounted: 140 callable exports, 130
named and 10 known only by NID.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 7, 2026
@AlexWhitehouse
AlexWhitehouse force-pushed the feat/libressl3-ecdsa-sig-get0 branch from 08876e8 to 773e3bf Compare November 7, 2026 13:02
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 7, 2026
@oneandonlydean
oneandonlydean merged commit 571cab9 into boykopovar:main Nov 7, 2026
13 of 14 checks passed
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.

3 participants