feat(libressl3): implement EVP_PKEY_bits #14409

Merged
DonRyuzaki merged 6 commits from upstream-pr/14409 into main 2026-11-06 09:08:09 +00:00
DonRyuzaki commented 2026-11-01 11:50:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DonRyuzaki on 2026-11-01T11:50:25Z.


What

Resubmission of #13941 after the author's PR allowance increased. The original was automatically closed for the earlier PR limit and remains closed; this PR supersedes it.

Implement EVP_PKEY_bits in the existing libSceLibreSsl3 library, replacing its throwing unknown-signature placeholder with int (const LibreSsl3EvpPkey*). Null keys, methods and callbacks return zero; otherwise dispatch through the method's pkey_bits callback with the original key and preserve its result.

The contract follows LibreSSL 4.0.0 p_lib.c. The existing key model places the method at offset 8; the callback at offset 104 follows that revision's LP64 evp_local.h. Record the unverified console ABI and constructor interoperability in the library's technical debt. This adds one function to an existing library and no third-party dependency.

Add a registered regression test covering null paths, the neighboring callback slot, original argument forwarding, exact callback count, signed return values, unchanged input objects and replacement/removal of the callback. The existing key-reference test also runs this coverage by default.

Tested

Windows x86-64, WinLibs GCC 15.2 DWARF, Release with bundled dependencies and BUILD_TESTING=ON. Tested local commit a99b4c27f90c32076d79d573fc20a15b820b6576, based on upstream ba627802e2210187d417deb64c8f2fed8e33011f. Published aa4fc310feb23ba86c31d0ce1c5786c8543692a0 has exactly the tested tree 6777f6e55ad6f9a63d1107b890b7f84e0ed1f4af.

  • Full-runtime configuration passed. Built libs, relinker, and all focused test targets with two compiler jobs.
  • Six runtime tests passed, zero failures or skips: patched_libraries, strict_nid_filter, guest_libressl3_pkey_bits, guest_libressl3_key_reference, guest_libressl3_pkey_getters, and guest_crypto_memcmp.
  • test_public_headers.py --audit-only: 399 libraries / 26,227 exports, unique declarations and umbrella coverage verified.
  • check_conventions.py --base origin/main and git diff --check origin/main HEAD passed.
  • Official pr_overlap.py --branch feat/pkey-bits-current used a fresh 1,648-head REST snapshot, unchanged comparison logic, and exact-base/head caches verified against live upstream ba627802e2210187d417deb64c8f2fed8e33011f. It returned 2: shared-line overlap with #12315 (debt insertion), #12945 (retain-helper extraction/test dispatch), and #14366 (RSA getter debt insertion/inventory); comparisons remained unverified for #9970, #10452, #10461, #10490, #10491, #10493, #10557, #10631, #11146, #12754, and #14212 because those peers conflict with the base. Every reported peer's actual shared patch, plus the refreshed #10960 digest-helper patch, was manually compared at its exact head: none implements EVP_PKEY_bits. Preserve both sets of changes when resolving the helper/test/debt hunks. This does not claim that those peers merge cleanly; this function does not depend on their implementations.

Console ABI and native key-constructor interoperability remain unverified and are recorded in the library's technical debt. Coverage uses caller-owned keys/methods. Validation here is Windows-only and focused; no entire-CTest-suite or title-compatibility claim.

Documentation follow-up (November 2, 2026): explicitly state that the console module's LibreSSL revision is unknown and that callback offset 104 assumes LibreSSL 4.0.0's LP64 EVP_PKEY_ASN1_METHOD layout. This follow-up changes only the debt entry; all code/build inputs are identical to the previously tested tree above. Re-ran the 399-library / 26,227-export public-header audit and the same six previously built runtime regressions: all passed. Current-main conventions and whitespace checks passed. This is not a new full-runtime build or console ABI verification.

Published follow-up 2573684d24be67e6b0dde001c01a1d5a43fa24cb has exactly the validated local tree ec185ba24382c808aa99c0286a941c5d16303898 (local source 89a4e19f48a30d9315ebeb8908396ba0d223a239).

Current-main refresh (November 5, 2026): rebased the unchanged feature onto upstream main e772fb25cc72ee5faf77847f06bbc69533016e82. Published head c8541e6841e3326d7f7b420ad3282b11d5473a3f has tree c8333a93c071393d79311f4ae29cd336ec4831a7; the worktree was clean. An isolated native Windows Release configuration succeeded using WinLibs GCC 15.2 and the pinned FFmpeg package. The guest_libressl3_key_reference_tests target built successfully (352 Ninja steps, two below-normal compiler jobs). Focused CTests guest_libressl3_pkey_bits and guest_libressl3_key_reference each passed three consecutive runs, with no skips. Current-main conventions and whitespace checks passed. This refresh did not repeat the full libs/relinker build, public-header audit, entire CTest suite, console ABI check, or game test; the earlier full-build evidence above applies to the older tree. The old hosted Windows job was cancelled at its 45-minute limit during guest-test compilation, before a test verdict. The refreshed head triggered a new Build run, initially queued. The local pr_overlap.py could not run because gh is unavailable here; a live GitHub PR search found no other open PR claiming EVP_PKEY_bits, but did not prove whole-repository line-overlap freedom.

Current-main merge (November 6, 2026): merged upstream main through c28413dda903edcfe7fe9d544abe1b7786cb0e31 into the existing branch. Published head 533a4fe645f1419a55a55d8c77cf2fb73c409207 has tree 5777d5ff7774734274822985c99518be61ab7998 and a clean working tree. The feature diff against this main is six files. Conflict resolution keeps the upstream Retain_nid_no_patch helper and ssl_ctx test case, retains the EVP_PKEY_bits implementation and test, and retains the upstream parent-forwarding count of 391. The initial pending-export count was corrected in the November 6 follow-up below.

On native Windows x64, Release CMake configuration and the guest_libressl3_key_reference_tests target build passed with GCC 15.2 and two below-normal compiler jobs. The registered guest_libressl3_pkey_bits and guest_libressl3_key_reference tests each passed three consecutive executions (2 tests, 0 failures/skips). git diff --check origin/main HEAD passed. check_conventions.py --base origin/main --head HEAD completed with 0 errors and one debt-entry length warning on that intermediate tree. This merge did not rerun the full libs/relinker build, whole CTest suite, public-header audit, console ABI check, or game test. The November 5 refreshed head's Build run later succeeded; fresh hosted checks for this merge are separate.

Latest-main merge and review correction (November 6, 2026): merged upstream main through e509b292479c383dabd18bf5c323eff1afe9d2f3 and published head b85b547dcf8bd1695c540de83fd66e3e7add2b58 (tree 3db5b072f0db35524f9a08b8badbfffe20aa8a80). The worktree is clean and the feature diff remains six files, with 83 additions and 7 deletions. This merge retains upstream native PKEY lifecycle changes and its 387 parent export forwarders without changing the EVP_PKEY_bits implementation. Dean's count review was verified against the source: Export.cpp has 46 throwing exports, while AdditionalExports.cpp has 164 remaining callable exports (154 named and 10 NID-only). The debt document now records those counts on the corresponding lines.

On native Windows x64, the Release guest_libressl3_key_reference_tests target rebuilt successfully with GCC 15.2 (217 Ninja steps; two below-normal compiler jobs). The registered guest_libressl3_pkey_bits and guest_libressl3_key_reference tests each passed three consecutive runs, with no failures or skips. On the final documentation-only follow-up, check_conventions.py --base origin/main --head HEAD passed with no findings, and git diff --check origin/main HEAD passed. The focused executable did not need rebuilding after the documentation-only correction. This update did not repeat the full libs/relinker build, whole CTest suite, console ABI check, or game test; hosted checks for this head are new and pending. Maintainer edits were enabled for this PR on November 6 at the author's request.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5107051369 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14409). Originally posted by [DonRyuzaki](https://github.com/DonRyuzaki) on 2026-11-01T11:50:25Z. --- ### What Resubmission of #13941 after the author's PR allowance increased. The original was automatically closed for the earlier PR limit and remains closed; this PR supersedes it. Implement `EVP_PKEY_bits` in the existing `libSceLibreSsl3` library, replacing its throwing unknown-signature placeholder with `int (const LibreSsl3EvpPkey*)`. Null keys, methods and callbacks return zero; otherwise dispatch through the method's `pkey_bits` callback with the original key and preserve its result. The contract follows [LibreSSL 4.0.0 p_lib.c](https://github.com/libressl/openbsd/blob/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/evp/p_lib.c). The existing key model places the method at offset 8; the callback at offset 104 follows that revision's LP64 `evp_local.h`. Record the unverified console ABI and constructor interoperability in the library's technical debt. This adds one function to an existing library and no third-party dependency. Add a registered regression test covering null paths, the neighboring callback slot, original argument forwarding, exact callback count, signed return values, unchanged input objects and replacement/removal of the callback. The existing key-reference test also runs this coverage by default. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows x86-64, WinLibs GCC 15.2 DWARF, Release with bundled dependencies and BUILD_TESTING=ON. Tested local commit `a99b4c27f90c32076d79d573fc20a15b820b6576`, based on upstream `ba627802e2210187d417deb64c8f2fed8e33011f`. Published `aa4fc310feb23ba86c31d0ce1c5786c8543692a0` has exactly the tested tree `6777f6e55ad6f9a63d1107b890b7f84e0ed1f4af`. - Full-runtime configuration passed. Built `libs`, `relinker`, and all focused test targets with two compiler jobs. - Six runtime tests passed, zero failures or skips: `patched_libraries`, `strict_nid_filter`, `guest_libressl3_pkey_bits`, `guest_libressl3_key_reference`, `guest_libressl3_pkey_getters`, and `guest_crypto_memcmp`. - `test_public_headers.py --audit-only`: 399 libraries / 26,227 exports, unique declarations and umbrella coverage verified. - `check_conventions.py --base origin/main` and `git diff --check origin/main HEAD` passed. - Official `pr_overlap.py --branch feat/pkey-bits-current` used a fresh 1,648-head REST snapshot, unchanged comparison logic, and exact-base/head caches verified against live upstream `ba627802e2210187d417deb64c8f2fed8e33011f`. It returned 2: shared-line overlap with #12315 (debt insertion), #12945 (retain-helper extraction/test dispatch), and #14366 (RSA getter debt insertion/inventory); comparisons remained unverified for #9970, #10452, #10461, #10490, #10491, #10493, #10557, #10631, #11146, #12754, and #14212 because those peers conflict with the base. Every reported peer's actual shared patch, plus the refreshed #10960 digest-helper patch, was manually compared at its exact head: none implements EVP_PKEY_bits. Preserve both sets of changes when resolving the helper/test/debt hunks. This does not claim that those peers merge cleanly; this function does not depend on their implementations. Console ABI and native key-constructor interoperability remain unverified and are recorded in the library's technical debt. Coverage uses caller-owned keys/methods. Validation here is Windows-only and focused; no entire-CTest-suite or title-compatibility claim. Documentation follow-up (November 2, 2026): explicitly state that the console module's LibreSSL revision is unknown and that callback offset 104 assumes LibreSSL 4.0.0's LP64 `EVP_PKEY_ASN1_METHOD` layout. This follow-up changes only the debt entry; all code/build inputs are identical to the previously tested tree above. Re-ran the 399-library / 26,227-export public-header audit and the same six previously built runtime regressions: all passed. Current-main conventions and whitespace checks passed. This is not a new full-runtime build or console ABI verification. Published follow-up `2573684d24be67e6b0dde001c01a1d5a43fa24cb` has exactly the validated local tree `ec185ba24382c808aa99c0286a941c5d16303898` (local source `89a4e19f48a30d9315ebeb8908396ba0d223a239`). Current-main refresh (November 5, 2026): rebased the unchanged feature onto upstream main `e772fb25cc72ee5faf77847f06bbc69533016e82`. Published head `c8541e6841e3326d7f7b420ad3282b11d5473a3f` has tree `c8333a93c071393d79311f4ae29cd336ec4831a7`; the worktree was clean. An isolated native Windows Release configuration succeeded using WinLibs GCC 15.2 and the pinned FFmpeg package. The `guest_libressl3_key_reference_tests` target built successfully (352 Ninja steps, two below-normal compiler jobs). Focused CTests `guest_libressl3_pkey_bits` and `guest_libressl3_key_reference` each passed three consecutive runs, with no skips. Current-main conventions and whitespace checks passed. This refresh did not repeat the full `libs`/`relinker` build, public-header audit, entire CTest suite, console ABI check, or game test; the earlier full-build evidence above applies to the older tree. The old hosted Windows job was cancelled at its 45-minute limit during guest-test compilation, before a test verdict. The refreshed head triggered a new [Build run](https://github.com/boykopovar/AnyPS5/actions/runs/42020937638), initially queued. The local `pr_overlap.py` could not run because `gh` is unavailable here; a live GitHub PR search found no other open PR claiming `EVP_PKEY_bits`, but did not prove whole-repository line-overlap freedom. Current-main merge (November 6, 2026): merged upstream main through `c28413dda903edcfe7fe9d544abe1b7786cb0e31` into the existing branch. Published head `533a4fe645f1419a55a55d8c77cf2fb73c409207` has tree `5777d5ff7774734274822985c99518be61ab7998` and a clean working tree. The feature diff against this main is six files. Conflict resolution keeps the upstream `Retain_nid_no_patch` helper and `ssl_ctx` test case, retains the `EVP_PKEY_bits` implementation and test, and retains the upstream parent-forwarding count of 391. The initial pending-export count was corrected in the November 6 follow-up below. On native Windows x64, Release CMake configuration and the `guest_libressl3_key_reference_tests` target build passed with GCC 15.2 and two below-normal compiler jobs. The registered `guest_libressl3_pkey_bits` and `guest_libressl3_key_reference` tests each passed three consecutive executions (2 tests, 0 failures/skips). `git diff --check origin/main HEAD` passed. `check_conventions.py --base origin/main --head HEAD` completed with 0 errors and one debt-entry length warning on that intermediate tree. This merge did not rerun the full `libs`/relinker build, whole CTest suite, public-header audit, console ABI check, or game test. The November 5 refreshed head's [Build run](https://github.com/boykopovar/AnyPS5/actions/runs/42020937638) later succeeded; fresh hosted checks for this merge are separate. Latest-main merge and review correction (November 6, 2026): merged upstream main through `e509b292479c383dabd18bf5c323eff1afe9d2f3` and published head `b85b547dcf8bd1695c540de83fd66e3e7add2b58` (tree `3db5b072f0db35524f9a08b8badbfffe20aa8a80`). The worktree is clean and the feature diff remains six files, with 83 additions and 7 deletions. This merge retains upstream native PKEY lifecycle changes and its 387 parent export forwarders without changing the `EVP_PKEY_bits` implementation. Dean's count review was verified against the source: `Export.cpp` has 46 throwing exports, while `AdditionalExports.cpp` has 164 remaining callable exports (154 named and 10 NID-only). The debt document now records those counts on the corresponding lines. On native Windows x64, the Release `guest_libressl3_key_reference_tests` target rebuilt successfully with GCC 15.2 (217 Ninja steps; two below-normal compiler jobs). The registered `guest_libressl3_pkey_bits` and `guest_libressl3_key_reference` tests each passed three consecutive runs, with no failures or skips. On the final documentation-only follow-up, `check_conventions.py --base origin/main --head HEAD` passed with no findings, and `git diff --check origin/main HEAD` passed. The focused executable did not need rebuilding after the documentation-only correction. This update did not repeat the full `libs`/relinker build, whole CTest suite, console ABI check, or game test; hosted checks for this head are new and pending. Maintainer edits were enabled for this PR on November 6 at the author's request. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-11-01 14:17:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T14:17:17Z.

Review: COMMENTED


Reviewed — no blocking findings

The EVP_PKEY_bits export dispatches through the method's pkey_bits slot and returns zero for null keys, methods and callbacks, as the PR says; the slot offset 104 is correct for the LibreSSL 4.0.0 layout the PR cites, but whether the console's library follows that layout is not known here, and the repository does not record it.

What I ran

  • Exact head aa4fc310feb23ba86c31d0ce1c5786c8543692a0, base ba627802e2210187d417deb64c8f2fed8e33011f.
  • Environment: Linux, /usr/bin/python3 3.11.2, no build.
  • Precheck: python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14409 --output-dir /dev/shm/reviewer-run/precheck/14409
  • ABI audit by hand (helper absent from the head tree): python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base ba627802e2210187d417deb64c8f2fed8e33011f --head aa4fc310feb23ba86c31d0ce1c5786c8543692a0 --json (exit 0; passed; 0 findings; 270 symbols).
  • Test-quality helper on core/libs/tests/GuestLibreSsl3KeyReference.cpp from a head extract: one literal-path registration heuristic.
  • Offset check: the LibreSSL 4.0.0 structure evp_pkey_asn1_method_st in src/lib/libcrypto/evp/evp_local.h at ce488b78e0bd994780569df718596b9776ff681a (fetched with gh api). Counting LP64 offsets: base_method 0, pkey_id 8, pkey_flags 16, pem_str 24, info 32, the six pub/priv callbacks 40 to 80, pkey_size 96, pkey_bits 104. The value 104 matches.

Results

Precheck report, checks table, unedited (/dev/shm/reviewer-run/precheck/14409/report.md):

Check Status Command / reason
build_and_compile not_applicable The precheck deliberately does not configure, build, or compile AnyPS5.
diff_check passed git diff --check ba627802e2210187d417deb64c8f2fed8e33011f...aa4fc310feb23ba86c31d0ce1c5786c8543692a0
conventions_and_pr_template passed /usr/bin/python3 tools/check_conventions.py --base ba627802e2210187d417deb64c8f2fed8e33011f --head aa4fc310feb23ba86c31d0ce1c5786c8543692a0 --title feat(libressl3): implement EVP_PKEY_bits --body /dev/shm/reviewer-run/precheck/14409/pr-body.md
changed_export_abi_audit failed /usr/bin/python3 tools/pr_abi_audit.py --base ba627802e2210187d417deb64c8f2fed8e33011f --head aa4fc310feb23ba86c31d0ce1c5786c8543692a0 --json
python_syntax not_applicable No changed Python implementation files.
related_python_unit_tests not_applicable No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.
python_test_registration not_applicable No changed test_*.py files.
live_dependency_and_mergeability_check passed /usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14409 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14409/stack
build_dependent_cpp_tests not_applicable Not run: C++ tests need exact-head binaries, which require a build; the precheck does not build.
test_quality_heuristics failed /usr/bin/python3 /dev/shm/reviewer-run/precheck/14409/head-aa4fc310feb2-1a9f74f7/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14409/head-aa4fc310feb2-1a9f74f7 --json core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp core/libs/prx/libSceLibreSsl3/CMakeLists.txt core/libs/prx/libSceLibreSsl3/include/Api.hpp core/libs/prx/libSceLibreSsl3/src/Key.cpp core/libs/tests/GuestLibreSsl3KeyReference.cpp docs/dev/debt/libSceLibreSsl3.md
negative_controls not_applicable No changed Python test module in tools/ can be run as a no-build base-source control.

Negative control

Not run here. The guest test is C++ and needs a build. The test writes a neighbouring method slot at 96 and checks that dispatch picks the slot at 104, which tests the code's constant, not the console's layout.

Findings

Blocking: none.

Non-blocking:

  • The offset is the 4.0.0 layout. In the 4.0.0 struct a base_method pointer replaces the 3.x pkey_base_id field, which is why the slot moves. I believe a 3.x layout would put pkey_bits at 96, but I did not fetch a 3.x header here, so that is an inference. The library's technical-debt entry says "no console ABI or behavior verification" and cites 4.0.0; it should also state the revision the libSceLibreSsl3 export is assumed to follow, and that the offset depends on it.
  • The method-slot read has no bounds check against the method object's size. That is the same trust the existing key model places in caller-owned methods (PR body: "Coverage uses caller-owned keys/methods").

Sources

Not verified

  • The LibreSSL revision the console's libSceLibreSsl3 follows; the 3.x layout was not fetched.
  • The C++ test was not built or run here.
  • Hosted: at this head conventions, eligibility, intake, labels and library-portability succeeded; linux, register-context, relinker, relinker-asan and write-watch were skipped.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5728531194 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14409#pullrequestreview-5728531194). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T14:17:17Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The `EVP_PKEY_bits` export dispatches through the method's `pkey_bits` slot and returns zero for null keys, methods and callbacks, as the PR says; the slot offset 104 is correct for the LibreSSL 4.0.0 layout the PR cites, but whether the console's library follows that layout is not known here, and the repository does not record it. ## What I ran - Exact head `aa4fc310feb23ba86c31d0ce1c5786c8543692a0`, base `ba627802e2210187d417deb64c8f2fed8e33011f`. - Environment: Linux, `/usr/bin/python3` 3.11.2, no build. - Precheck: `python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14409 --output-dir /dev/shm/reviewer-run/precheck/14409` - ABI audit by hand (helper absent from the head tree): `python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base ba627802e2210187d417deb64c8f2fed8e33011f --head aa4fc310feb23ba86c31d0ce1c5786c8543692a0 --json` (exit 0; `passed`; 0 findings; 270 symbols). - Test-quality helper on `core/libs/tests/GuestLibreSsl3KeyReference.cpp` from a head extract: one literal-path registration heuristic. - Offset check: the LibreSSL 4.0.0 structure `evp_pkey_asn1_method_st` in `src/lib/libcrypto/evp/evp_local.h` at `ce488b78e0bd994780569df718596b9776ff681a` (fetched with `gh api`). Counting LP64 offsets: `base_method` 0, `pkey_id` 8, `pkey_flags` 16, `pem_str` 24, `info` 32, the six pub/priv callbacks 40 to 80, `pkey_size` 96, `pkey_bits` 104. The value 104 matches. ## Results Precheck report, checks table, unedited (`/dev/shm/reviewer-run/precheck/14409/report.md`): | Check | Status | Command / reason | |---|---|---| | build_and_compile | not_applicable | `The precheck deliberately does not configure, build, or compile AnyPS5.` | | diff_check | passed | `git diff --check ba627802e2210187d417deb64c8f2fed8e33011f...aa4fc310feb23ba86c31d0ce1c5786c8543692a0` | | conventions_and_pr_template | passed | `/usr/bin/python3 tools/check_conventions.py --base ba627802e2210187d417deb64c8f2fed8e33011f --head aa4fc310feb23ba86c31d0ce1c5786c8543692a0 --title feat(libressl3): implement EVP_PKEY_bits --body /dev/shm/reviewer-run/precheck/14409/pr-body.md` | | changed_export_abi_audit | failed | `/usr/bin/python3 tools/pr_abi_audit.py --base ba627802e2210187d417deb64c8f2fed8e33011f --head aa4fc310feb23ba86c31d0ce1c5786c8543692a0 --json` | | python_syntax | not_applicable | `No changed Python implementation files.` | | related_python_unit_tests | not_applicable | `No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.` | | python_test_registration | not_applicable | `No changed test_*.py files.` | | live_dependency_and_mergeability_check | passed | `/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14409 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14409/stack` | | build_dependent_cpp_tests | not_applicable | `Not run: C++ tests need exact-head binaries, which require a build; the precheck does not build.` | | test_quality_heuristics | failed | `/usr/bin/python3 /dev/shm/reviewer-run/precheck/14409/head-aa4fc310feb2-1a9f74f7/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14409/head-aa4fc310feb2-1a9f74f7 --json core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp core/libs/prx/libSceLibreSsl3/CMakeLists.txt core/libs/prx/libSceLibreSsl3/include/Api.hpp core/libs/prx/libSceLibreSsl3/src/Key.cpp core/libs/tests/GuestLibreSsl3KeyReference.cpp docs/dev/debt/libSceLibreSsl3.md` | | negative_controls | not_applicable | `No changed Python test module in tools/ can be run as a no-build base-source control.` | ## Negative control Not run here. The guest test is C++ and needs a build. The test writes a neighbouring method slot at 96 and checks that dispatch picks the slot at 104, which tests the code's constant, not the console's layout. ## Findings **Blocking:** none. **Non-blocking:** - The offset is the 4.0.0 layout. In the 4.0.0 struct a `base_method` pointer replaces the 3.x `pkey_base_id` field, which is why the slot moves. I believe a 3.x layout would put `pkey_bits` at 96, but I did not fetch a 3.x header here, so that is an inference. The library's technical-debt entry says "no console ABI or behavior verification" and cites 4.0.0; it should also state the revision the `libSceLibreSsl3` export is assumed to follow, and that the offset depends on it. - The method-slot read has no bounds check against the method object's size. That is the same trust the existing key model places in caller-owned methods (PR body: "Coverage uses caller-owned keys/methods"). ## Sources - LibreSSL 4.0.0 method struct (commit-pinned): https://github.com/libressl/openbsd/blob/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/evp/evp_local.h#L92-L113 - Dispatch at head: https://github.com/boykopovar/AnyPS5/blob/aa4fc310feb23ba86c31d0ce1c5786c8543692a0/core/libs/prx/libSceLibreSsl3/src/Key.cpp#L32-L39 ## Not verified - The LibreSSL revision the console's `libSceLibreSsl3` follows; the 3.x layout was not fetched. - The C++ test was not built or run here. - Hosted: at this head `conventions`, `eligibility`, `intake`, `labels` and `library-portability` succeeded; `linux`, `register-context`, `relinker`, `relinker-asan` and `write-watch` were skipped.
CnRJay commented 2026-11-01 19:47:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:47:01Z.

Review: COMMENTED


Withdrawn. This review applied a title-ID/log requirement that is not in CONTRIBUTING (Unblocks: none is allowed), and it contained no code review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729914185 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14409#pullrequestreview-5729914185). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-11-01T19:47:01Z. **Review:** COMMENTED --- Withdrawn. This review applied a title-ID/log requirement that is not in CONTRIBUTING (`Unblocks: none` is allowed), and it contained no code review.
MarcZX10 commented 2026-11-05 00:25:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-05T00:25:06Z.

Review: COMMENTED


Reviewed — no blocking findings

EVP_PKEY_bits follows LibreSSL 4.0.0 and its method-table offset (104) matches that revision's struct; the Windows job on this head was cancelled, and I did not build or run the new test.

What I ran

Head 2573684d24be67e6b0dde001c01a1d5a43fa24cb, PR base ba627802e2210187d417deb64c8f2fed8e33011f. I read the whole diff (6 files) and the head's Key.cpp, and compared them with LibreSSL 4.0.0 (p_lib.c and evp_local.h at ce488b78e0bd994780569df718596b9776ff681a). Environment: Debian 12, Linux x86_64. No AnyPS5 build was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14409
gh pr diff 14409 -R boykopovar/AnyPS5
gh api 'repos/boykopovar/AnyPS5/contents/core/libs/prx/libSceLibreSsl3/src/Key.cpp?ref=2573684d24be67e6b0dde001c01a1d5a43fa24cb'
curl -sL https://raw.githubusercontent.com/libressl/openbsd/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/evp/p_lib.c
curl -sL https://raw.githubusercontent.com/libressl/openbsd/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/evp/evp_local.h
gh pr checks 14409 -R boykopovar/AnyPS5

Results

Check Result Note
Diff check, conventions, template passed precheck
Export and ABI audit passed precheck
Test-quality heuristic passed precheck
Merge and dependency preview passed precheck
Behavior against LibreSSL 4.0.0 passed null key, method or callback gives 0
Method-table offset 104 passed counted from the struct on LP64
Debt-entry export count passed 176 to 175 for the removed stub; named and NID-only split now 165 and 10, in line with the 116 names the entry records
Hosted Windows build not run job was cancelled on this head
Hosted conventions, labels, portability passed
AMD GPU CI comment on this head not run reports a passing build, no new failures
Local build and the new test not run
Precheck report for this head, unedited table
Check Status Why / command
build_and_compile not_run Builds are intentionally excluded from this fast, no-build check pass.
diff_check passed Command ran; see raw output below. Command: git diff --check ba627802e2210187d417deb64c8f2fed8e33011f...2573684d24be67e6b0dde001c01a1d5a43fa24cb
conventions_and_pr_template passed Command ran; see raw output below. Command: /marc/DeusMachina_0x1914/.venv/bin/python3 tools/check_conventions.py --base ba627802e2210187d417deb64c8f2fed8e33011f --head 2573684d24be67e6b0dde001c01a1d5a43fa24cb --title feat(libressl3): implement EVP_PKEY_bits --body /tmp/anyps5-pr-precheck/final/14409/pr-body.md
changed_export_abi_audit passed Command ran; see raw output below. Command: /marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_abi_audit.py --base ba627802e2210187d417deb64c8f2fed8e33011f --head 2573684d24be67e6b0dde001c01a1d5a43fa24cb --json
python_syntax not_applicable No changed Python implementation files.
related_python_unit_tests not_applicable No changed Python tool module has a related tools/tests/test_.py suite.
python_test_registration not_applicable No changed Python test files need registration.
live_dependency_and_mergeability_check passed Command ran; see raw output below. Command: /marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14409 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/final/14409/stack
build_dependent_cpp_tests not_run Changed C/C++ source or test files need exact-head binaries; this fast pass does not build.
test_quality_heuristics passed Command ran; see raw output below. Command: /marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/final/14409/head-2573684d24be-798d46cd --json core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp core/libs/prx/libSceLibreSsl3/CMakeLists.txt core/libs/prx/libSceLibreSsl3/include/Api.hpp core/libs/prx/libSceLibreSsl3/src/Key.cpp core/libs/tests/GuestLibreSsl3KeyReference.cpp docs/dev/debt/libSceLibreSsl3.md
negative_controls not_applicable No changed tools/ Python test module is eligible for a base-source negative control.

Negative control

Not run. The new CheckBits test covers a null key, a key without a method, a neighbouring slot (offset 96) holding a failing callback, a removed callback and eight callback results; I read it but did not run it.

Findings

Blocking

None.

Non-blocking

None.

Sources

Not verified

  • Compilation and the new guest_libressl3_pkey_bits test on any platform. The AMD GPU CI comment is another contributor's report, not my run.
  • The hosted Windows build: the job was cancelled on this head (the author reports it hit the 45-minute limit).
  • The console module's LibreSSL revision and method layout; the debt entry already says they are unverified.

To get this to a good state

  1. Get the hosted Windows build to complete on 2573684d24be67e6b0dde001c01a1d5a43fa24cb; a maintainer has to rerun it.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5777968986 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14409#pullrequestreview-5777968986). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-05T00:25:06Z. **Review:** COMMENTED --- # Reviewed — no blocking findings `EVP_PKEY_bits` follows LibreSSL 4.0.0 and its method-table offset (104) matches that revision's struct; the Windows job on this head was cancelled, and I did not build or run the new test. ## What I ran Head `2573684d24be67e6b0dde001c01a1d5a43fa24cb`, PR base `ba627802e2210187d417deb64c8f2fed8e33011f`. I read the whole diff (6 files) and the head's `Key.cpp`, and compared them with LibreSSL 4.0.0 (`p_lib.c` and `evp_local.h` at `ce488b78e0bd994780569df718596b9776ff681a`). Environment: Debian 12, Linux x86_64. No AnyPS5 build was run. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14409 gh pr diff 14409 -R boykopovar/AnyPS5 gh api 'repos/boykopovar/AnyPS5/contents/core/libs/prx/libSceLibreSsl3/src/Key.cpp?ref=2573684d24be67e6b0dde001c01a1d5a43fa24cb' curl -sL https://raw.githubusercontent.com/libressl/openbsd/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/evp/p_lib.c curl -sL https://raw.githubusercontent.com/libressl/openbsd/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/evp/evp_local.h gh pr checks 14409 -R boykopovar/AnyPS5 ``` ## Results | Check | Result | Note | |---|---|---| | Diff check, conventions, template | passed | precheck | | Export and ABI audit | passed | precheck | | Test-quality heuristic | passed | precheck | | Merge and dependency preview | passed | precheck | | Behavior against LibreSSL 4.0.0 | passed | null key, method or callback gives 0 | | Method-table offset 104 | passed | counted from the struct on LP64 | | Debt-entry export count | passed | 176 to 175 for the removed stub; named and NID-only split now 165 and 10, in line with the 116 names the entry records | | Hosted Windows build | not run | job was cancelled on this head | | Hosted conventions, labels, portability | passed | | | AMD GPU CI comment on this head | not run | reports a passing build, no new failures | | Local build and the new test | not run | | <details> <summary>Precheck report for this head, unedited table</summary> | Check | Status | Why / command | |---|---|---| | build_and_compile | not_run | Builds are intentionally excluded from this fast, no-build check pass. | | diff_check | passed | Command ran; see raw output below. Command: `git diff --check ba627802e2210187d417deb64c8f2fed8e33011f...2573684d24be67e6b0dde001c01a1d5a43fa24cb` | | conventions_and_pr_template | passed | Command ran; see raw output below. Command: `/marc/DeusMachina_0x1914/.venv/bin/python3 tools/check_conventions.py --base ba627802e2210187d417deb64c8f2fed8e33011f --head 2573684d24be67e6b0dde001c01a1d5a43fa24cb --title feat(libressl3): implement EVP_PKEY_bits --body /tmp/anyps5-pr-precheck/final/14409/pr-body.md` | | changed_export_abi_audit | passed | Command ran; see raw output below. Command: `/marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_abi_audit.py --base ba627802e2210187d417deb64c8f2fed8e33011f --head 2573684d24be67e6b0dde001c01a1d5a43fa24cb --json` | | python_syntax | not_applicable | No changed Python implementation files. | | related_python_unit_tests | not_applicable | No changed Python tool module has a related tools/tests/test_<module>.py suite. | | python_test_registration | not_applicable | No changed Python test files need registration. | | live_dependency_and_mergeability_check | passed | Command ran; see raw output below. Command: `/marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14409 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/final/14409/stack` | | build_dependent_cpp_tests | not_run | Changed C/C++ source or test files need exact-head binaries; this fast pass does not build. | | test_quality_heuristics | passed | Command ran; see raw output below. Command: `/marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/final/14409/head-2573684d24be-798d46cd --json core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp core/libs/prx/libSceLibreSsl3/CMakeLists.txt core/libs/prx/libSceLibreSsl3/include/Api.hpp core/libs/prx/libSceLibreSsl3/src/Key.cpp core/libs/tests/GuestLibreSsl3KeyReference.cpp docs/dev/debt/libSceLibreSsl3.md` | | negative_controls | not_applicable | No changed tools/ Python test module is eligible for a base-source negative control. | </details> ## Negative control Not run. The new `CheckBits` test covers a null key, a key without a method, a neighbouring slot (offset 96) holding a failing callback, a removed callback and eight callback results; I read it but did not run it. ## Findings ### Blocking None. ### Non-blocking None. ## Sources - Offset constant: https://github.com/boykopovar/AnyPS5/blob/2573684d24be67e6b0dde001c01a1d5a43fa24cb/core/libs/prx/libSceLibreSsl3/src/Key.cpp#L11 - `EVP_PKEY_bits_nid_postfix`: https://github.com/boykopovar/AnyPS5/blob/2573684d24be67e6b0dde001c01a1d5a43fa24cb/core/libs/prx/libSceLibreSsl3/src/Key.cpp#L32-L38 - LibreSSL `EVP_PKEY_bits`: https://github.com/libressl/openbsd/blob/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/evp/p_lib.c#L262-L267 - LibreSSL method table (`pkey_size` then `pkey_bits`): https://github.com/libressl/openbsd/blob/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/evp/evp_local.h#L92-L112 ## Not verified - Compilation and the new `guest_libressl3_pkey_bits` test on any platform. The AMD GPU CI comment is another contributor's report, not my run. - The hosted Windows build: the job was cancelled on this head (the author reports it hit the 45-minute limit). - The console module's LibreSSL revision and method layout; the debt entry already says they are unverified. ## To get this to a good state 1. Get the hosted Windows build to complete on `2573684d24be67e6b0dde001c01a1d5a43fa24cb`; a maintainer has to rerun it.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!14409
No description provided.