feat(libSceLibreSsl3): implement X509_VERIFY_PARAM_set_flags #13662

Merged
alvaroelpob merged 3 commits from upstream-pr/13662 into main 2026-10-31 17:25:12 +00:00
alvaroelpob commented 2026-10-30 22:11:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by alvaroelpob on 2026-10-30T22:11:27Z.


What

Implements X509_VERIFY_PARAM_set_flags in libSceLibreSsl3, an additional export (13.60 table) that threw and was declared without parameters.

The signature is int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM*, unsigned long). LibreSSL 2.5.4 and 4.0.0 x509_vpm.c both OR the flags into flags and return 1, and that is what this does.

The two versions differ in one case: EXPLICIT_POLICY, INHIBIT_ANY or INHIBIT_MAP is set while POLICY_CHECK is neither already set nor requested. Then 2.5.4 also adds POLICY_CHECK (they are part of X509_V_FLAG_POLICY_MASK) and 4.0.0 does not. Which one the console follows is not established, so that case throws through NotImplemented_nid_no_patch and leaves the parameters unchanged. In every other case, including policy flags requested together with POLICY_CHECK or set when it is already set, both versions give the same result.

It takes libSceLibreSsl's LibreSslX509VerifyParam, the 2.5.4 parameters that the forwarded X509_STORE and X509_VERIFY_PARAM_* exports use. flags is at offset 24 there and in 4.0.0's x509_local.h; a static_assert checks it. LibreSSL dereferences the parameters without checking them, so null parameters throw.

The debt entry records the version difference, the source and what is unverified. The additional-export inventory loses the function's row and its count drops from 177 to 176.

Tested

Ubuntu 26.04 (WSL2, kernel 6.18), GCC 15.2.0, Release, full build with BUILD_TESTING=ON, rebased on main 474030e584 (after #13659 and #13663).

  • New guest_libressl3_x509_verify_param test, with parameters filled with 0x5A and guarded by 16 bytes on each side:
    • For empty, repeated and all-ones flags, POLICY_CHECK alone, POLICY_CHECK | EXPLICIT_POLICY, and policy variables over an existing POLICY_CHECK, X509_VERIFY_PARAM_set_flags returns 1, ORs the flags into flags and changes no other byte.
    • EXPLICIT_POLICY, INHIBIT_ANY, INHIBIT_MAP and EXPLICIT_POLICY | PARTIAL_CHAIN over 0, PARTIAL_CHAIN and EXPLICIT_POLICY throw the not-implemented error without changing any byte.
    • Null parameters throw std::invalid_argument.
  • Full ctest -j16 on head 0736525cac: 3062/3062 pass. check_conventions.py --base upstream/main passes.
  • Not tested: Windows, a title.

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:5091689546 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13662). Originally posted by [alvaroelpob](https://github.com/alvaroelpob) on 2026-10-30T22:11:27Z. --- ### What Implements `X509_VERIFY_PARAM_set_flags` in libSceLibreSsl3, an additional export (13.60 table) that threw and was declared without parameters. The signature is `int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM*, unsigned long)`. [LibreSSL 2.5.4](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/x509/x509_vpm.c) and [4.0.0](https://github.com/libressl/openbsd/blob/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/x509/x509_vpm.c) `x509_vpm.c` both OR the flags into `flags` and return 1, and that is what this does. The two versions differ in one case: `EXPLICIT_POLICY`, `INHIBIT_ANY` or `INHIBIT_MAP` is set while `POLICY_CHECK` is neither already set nor requested. Then 2.5.4 also adds `POLICY_CHECK` (they are part of `X509_V_FLAG_POLICY_MASK`) and 4.0.0 does not. Which one the console follows is not established, so that case throws through `NotImplemented_nid_no_patch` and leaves the parameters unchanged. In every other case, including policy flags requested together with `POLICY_CHECK` or set when it is already set, both versions give the same result. It takes libSceLibreSsl's `LibreSslX509VerifyParam`, the 2.5.4 parameters that the forwarded `X509_STORE` and `X509_VERIFY_PARAM_*` exports use. `flags` is at offset 24 there and in 4.0.0's `x509_local.h`; a `static_assert` checks it. LibreSSL dereferences the parameters without checking them, so null parameters throw. The debt entry records the version difference, the source and what is unverified. The additional-export inventory loses the function's row and its count drops from 177 to 176. ### 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. --> Ubuntu 26.04 (WSL2, kernel 6.18), GCC 15.2.0, Release, full build with `BUILD_TESTING=ON`, rebased on `main` 474030e584 (after #13659 and #13663). - New `guest_libressl3_x509_verify_param` test, with parameters filled with 0x5A and guarded by 16 bytes on each side: - For empty, repeated and all-ones flags, `POLICY_CHECK` alone, `POLICY_CHECK | EXPLICIT_POLICY`, and policy variables over an existing `POLICY_CHECK`, `X509_VERIFY_PARAM_set_flags` returns 1, ORs the flags into `flags` and changes no other byte. - `EXPLICIT_POLICY`, `INHIBIT_ANY`, `INHIBIT_MAP` and `EXPLICIT_POLICY | PARTIAL_CHAIN` over 0, `PARTIAL_CHAIN` and `EXPLICIT_POLICY` throw the not-implemented error without changing any byte. - Null parameters throw `std::invalid_argument`. - Full `ctest -j16` on head 0736525cac: 3062/3062 pass. `check_conventions.py --base upstream/main` passes. - Not tested: Windows, a title. ### 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-10-30 22:20:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T22:20:19Z.

Review: COMMENTED


Reviewed — approval withheld pending test-report clarification

The implementation matches the cited LibreSSL flag update, but the PR’s test section both reports and denies a full-suite run on this head.

What I ran

Reviewed head a6007ddfc3693473f34091736588b23026cab2aa against base 9605300f293b88295e223a27ff8cfecf24d7ab2a; the individual merge preview is clean. Environment: Debian Linux x86-64, Python 3.11.2; GCC 12.2.0 available but not invoked. No local build or C++ test was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13662
python3 tools/pr_stack_check.py 13662 --repo boykopovar/AnyPS5
python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base 9605300f293b88295e223a27ff8cfecf24d7ab2a --head a6007ddfc3693473f34091736588b23026cab2aa --json
python3 tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13662-a6007ddfc369/head-a6007ddfc369-601a09d1 --json core/libs/prx/libSceLibreSsl3/tests/X509VerifyParam.cpp
git worktree add --detach /tmp/anyps5-review-13662-header a6007ddfc3693473f34091736588b23026cab2aa
(cd /tmp/anyps5-review-13662-header && python3 core/libs/tests/test_public_headers.py --audit-only)
git worktree remove --force /tmp/anyps5-review-13662-header
git diff --check 9605300f293b88295e223a27ff8cfecf24d7ab2a...a6007ddfc3693473f34091736588b23026cab2aa
gh pr checks 13662 --repo boykopovar/AnyPS5

The declared predecessor is #13659. I also applied the #13659 and #13662 GitHub diff patches in that order with git apply --3way in a temporary worktree at the base. The second patch conflicted in shared CMake and debt files; I did not resolve the conflict or claim a completed integration test.

Results

Check Result
Diff and conventions Passed on this exact head.
Individual merge/dependency preview #13659 and #13662 each preview cleanly against the current base; the declared order is #13659 → #13662.
Sequential patch composition Applying #13662 after #13659 conflicted in CMakeLists.txt and docs/dev/debt/libSceLibreSsl3.md. This needs a refresh after #13659 lands; I am not asking for a premature rebase.
ABI audit Passed with no findings; declaration and definition map to NID 9E9Gr4FLIE4.
Public-header audit Passed on this head: 389 libraries, 24,477 exports.
Test-quality heuristic It warned that the test might be unregistered, but exact-head CMake explicitly registers X509VerifyParam.cpp; this is a false positive.
Hosted CI Intake, library-portability, and report passed. Conventions, eligibility, and labels were pending at the final refresh.
Author-reported tests The PR reports 3029/3029 CTest cases on a6007ddfc3, then says the full suite on this branch is “not tested yet.” I did not independently run the suite.
Unedited outputs from checks
All conventions checks passed.
{
  "status": "passed",
  "symbol": [
    {
      "name": "X509_VERIFY_PARAM_set_flags_nid_postfix",
      "computed_nid": "9E9Gr4FLIE4",
      "declarations": [
        "core/libs/prx/libSceLibreSsl3/include/Api.hpp"
      ],
      "definitions": [
        "core/libs/prx/libSceLibreSsl3/src/X509VerifyParam.cpp"
      ],
      "explicit_aliases": [],
      "version": "not encoded by these source declarations; not verified"
    }
  ],
  "findings": []
}
389 libraries, 24477 exports: unique declarations and umbrella coverage verified
{
  "findings": [
    {
      "path": "core/libs/prx/libSceLibreSsl3/tests/X509VerifyParam.cpp",
      "line": 1,
      "kind": "possible-unregistered-cpp-test",
      "message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage."
    }
  ],
  "negative_control_candidates": [],
  "limits": [
    "Heuristics can miss weak assertions and can flag valid tests; inspect every finding.",
    "A test that passes against base is not by itself proof that the PR test is inadequate.",
    "Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error."
  ]
}
intake	pass	20s	https://github.com/boykopovar/AnyPS5/actions/runs/41136443402/job/124339961750
library-portability	pass	1m37s	https://github.com/boykopovar/AnyPS5/actions/runs/41136443835/job/124339961281
report	pass	45s	https://github.com/boykopovar/AnyPS5/actions/runs/41136443999/job/124339961541
conventions	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41136443610/job/124339962105
eligibility	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41136443846/job/124339961743
labels	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41136443770/job/124339962684
Applied patch to 'core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp' cleanly.
Applied patch to 'core/libs/prx/libSceLibreSsl3/CMakeLists.txt' with conflicts.
Applied patch to 'core/libs/prx/libSceLibreSsl3/include/Api.hpp' cleanly.
Applied patch to 'docs/dev/debt/libSceLibreSsl3.md' with conflicts.
U core/libs/prx/libSceLibreSsl3/CMakeLists.txt
U docs/dev/debt/libSceLibreSsl3.md

git diff --check produced no output and exited 0.

Negative control

I did not build the test executable or run a local negative control. The reported baseline and PR test runs were not independently reproduced here.

Findings

Blocking

No implementation defect was confirmed. I am withholding approval until the test report clarifies whether the claimed 3029-case run covered this exact head.

Non-blocking

Source inspection confirms the code throws for null parameters, ORs the requested flags into the field at offset 24, and returns 1; the test checks surrounding bytes and policy-flag behavior. The sequential dependency conflict should be revisited after #13659 lands.

Sources

Not verified

No local build, C++ test, Windows/macOS runtime, console behavior, or title test was run. The author-reported full-suite result was not independently reproduced, and the dependency-composed branch was not completed because the sequential patch check conflicted.

To get this to a good state

Please clarify whether ctest -j16 ran on head a6007ddfc3693473f34091736588b23026cab2aa and remove or correct the contradictory “Not tested yet” statement. After #13659 lands, refresh this branch, resolve the shared-file conflicts, and rerun the relevant checks on the resulting head; I will reassess that update.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5719291532 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13662#pullrequestreview-5719291532). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T22:20:19Z. **Review:** COMMENTED --- # Reviewed — approval withheld pending test-report clarification The implementation matches the cited LibreSSL flag update, but the PR’s test section both reports and denies a full-suite run on this head. ## What I ran Reviewed head `a6007ddfc3693473f34091736588b23026cab2aa` against base `9605300f293b88295e223a27ff8cfecf24d7ab2a`; the individual merge preview is clean. Environment: Debian Linux x86-64, Python 3.11.2; GCC 12.2.0 available but not invoked. No local build or C++ test was run. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13662 python3 tools/pr_stack_check.py 13662 --repo boykopovar/AnyPS5 python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base 9605300f293b88295e223a27ff8cfecf24d7ab2a --head a6007ddfc3693473f34091736588b23026cab2aa --json python3 tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13662-a6007ddfc369/head-a6007ddfc369-601a09d1 --json core/libs/prx/libSceLibreSsl3/tests/X509VerifyParam.cpp git worktree add --detach /tmp/anyps5-review-13662-header a6007ddfc3693473f34091736588b23026cab2aa (cd /tmp/anyps5-review-13662-header && python3 core/libs/tests/test_public_headers.py --audit-only) git worktree remove --force /tmp/anyps5-review-13662-header git diff --check 9605300f293b88295e223a27ff8cfecf24d7ab2a...a6007ddfc3693473f34091736588b23026cab2aa gh pr checks 13662 --repo boykopovar/AnyPS5 ``` The declared predecessor is #13659. I also applied the #13659 and #13662 GitHub diff patches in that order with `git apply --3way` in a temporary worktree at the base. The second patch conflicted in shared CMake and debt files; I did not resolve the conflict or claim a completed integration test. ## Results | Check | Result | |---|---| | Diff and conventions | Passed on this exact head. | | Individual merge/dependency preview | #13659 and #13662 each preview cleanly against the current base; the declared order is #13659 → #13662. | | Sequential patch composition | Applying #13662 after #13659 conflicted in `CMakeLists.txt` and `docs/dev/debt/libSceLibreSsl3.md`. This needs a refresh after #13659 lands; I am not asking for a premature rebase. | | ABI audit | Passed with no findings; declaration and definition map to NID `9E9Gr4FLIE4`. | | Public-header audit | Passed on this head: 389 libraries, 24,477 exports. | | Test-quality heuristic | It warned that the test might be unregistered, but exact-head CMake explicitly registers `X509VerifyParam.cpp`; this is a false positive. | | Hosted CI | Intake, library-portability, and report passed. Conventions, eligibility, and labels were pending at the final refresh. | | Author-reported tests | The PR reports 3029/3029 CTest cases on `a6007ddfc3`, then says the full suite on this branch is “not tested yet.” I did not independently run the suite. | <details><summary>Unedited outputs from checks</summary> ```text All conventions checks passed. ``` ```json { "status": "passed", "symbol": [ { "name": "X509_VERIFY_PARAM_set_flags_nid_postfix", "computed_nid": "9E9Gr4FLIE4", "declarations": [ "core/libs/prx/libSceLibreSsl3/include/Api.hpp" ], "definitions": [ "core/libs/prx/libSceLibreSsl3/src/X509VerifyParam.cpp" ], "explicit_aliases": [], "version": "not encoded by these source declarations; not verified" } ], "findings": [] } ``` ```text 389 libraries, 24477 exports: unique declarations and umbrella coverage verified ``` ```json { "findings": [ { "path": "core/libs/prx/libSceLibreSsl3/tests/X509VerifyParam.cpp", "line": 1, "kind": "possible-unregistered-cpp-test", "message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage." } ], "negative_control_candidates": [], "limits": [ "Heuristics can miss weak assertions and can flag valid tests; inspect every finding.", "A test that passes against base is not by itself proof that the PR test is inadequate.", "Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error." ] } ``` ```text intake pass 20s https://github.com/boykopovar/AnyPS5/actions/runs/41136443402/job/124339961750 library-portability pass 1m37s https://github.com/boykopovar/AnyPS5/actions/runs/41136443835/job/124339961281 report pass 45s https://github.com/boykopovar/AnyPS5/actions/runs/41136443999/job/124339961541 conventions pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41136443610/job/124339962105 eligibility pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41136443846/job/124339961743 labels pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41136443770/job/124339962684 ``` ```text Applied patch to 'core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp' cleanly. Applied patch to 'core/libs/prx/libSceLibreSsl3/CMakeLists.txt' with conflicts. Applied patch to 'core/libs/prx/libSceLibreSsl3/include/Api.hpp' cleanly. Applied patch to 'docs/dev/debt/libSceLibreSsl3.md' with conflicts. U core/libs/prx/libSceLibreSsl3/CMakeLists.txt U docs/dev/debt/libSceLibreSsl3.md ``` `git diff --check` produced no output and exited 0. </details> ## Negative control I did not build the test executable or run a local negative control. The reported baseline and PR test runs were not independently reproduced here. ## Findings ### Blocking No implementation defect was confirmed. I am withholding approval until the test report clarifies whether the claimed 3029-case run covered this exact head. ### Non-blocking Source inspection confirms the code throws for null parameters, ORs the requested flags into the field at offset 24, and returns 1; the test checks surrounding bytes and policy-flag behavior. The sequential dependency conflict should be revisited after #13659 lands. ## Sources - [Implementation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/a6007ddfc3693473f34091736588b23026cab2aa/core/libs/prx/libSceLibreSsl3/src/X509VerifyParam.cpp) - [Parameter layout at the PR base](https://github.com/boykopovar/AnyPS5/blob/9605300f293b88295e223a27ff8cfecf24d7ab2a/core/libs/prx/libSceLibreSsl/include/Api.hpp#L22-L30) - [LibreSSL 4.0.0 flag update](https://github.com/libressl/openbsd/blob/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/x509/x509_vpm.c#L387-L392) - [LibreSSL 2.5.4 policy-flag behavior](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/x509/x509_vpm.c#L408-L414) ## Not verified No local build, C++ test, Windows/macOS runtime, console behavior, or title test was run. The author-reported full-suite result was not independently reproduced, and the dependency-composed branch was not completed because the sequential patch check conflicted. ## To get this to a good state Please clarify whether `ctest -j16` ran on head `a6007ddfc3693473f34091736588b23026cab2aa` and remove or correct the contradictory “Not tested yet” statement. After #13659 lands, refresh this branch, resolve the shared-file conflicts, and rerun the relevant checks on the resulting head; I will reassess that update.
MarcZX10 commented 2026-10-30 23:17:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T23:17:31Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The test pins a LibreSSL 4.0.0 policy-flag behavior that is version-sensitive and has not been established for this PS5 export.

What I ran

Reviewed head a6007ddfc3693473f34091736588b23026cab2aa against PR base 9605300f293b88295e223a27ff8cfecf24d7ab2a. The individual merge preview was clean against current main 06f47c0e81076834a0aaeca0ec9affad7d5fafd9; the declared #13659 dependency head is not included, so this was not a combined-stack preview. Environment: Linux x86_64, Python 3.11.2; GCC 12.2.0 was available but not invoked.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13662
python3 tools/pr_abi_audit.py --base 9605300f293b88295e223a27ff8cfecf24d7ab2a --head a6007ddfc3693473f34091736588b23026cab2aa --json | python3 -c 'import json,sys; d=json.load(sys.stdin); print("status:",d.get("status")); print("findings:",len(d.get("findings",[]))); print("target:",[s for s in d.get("symbols",[]) if s.get("name")=="X509_VERIFY_PARAM_set_flags_nid_postfix"])'
gh pr view 13662 --repo boykopovar/AnyPS5 --json statusCheckRollup --jq '[.statusCheckRollup[]|{name,status,conclusion}]'

Results

Check Result
git diff --check Passed in the exact-head precheck.
Conventions and PR template Passed locally and in hosted CI.
ABI audit Direct audit passed with no findings; the NID matched the declared export. The precheck's isolated copy lacked the workspace-only audit script.
Test registration The CMake target and CTest registration are present in the diff; the precheck's isolated copy lacked the test-quality helper.
Current-main merge preview Clean individually; the declared #13659 dependency remains open and is not included in this head. A prior sequential patch check recorded conflicts in shared CMake and debt files; this session did not repeat that composition check.
Hosted eligibility, conventions, library-portability, intake, labels, report Passed.
Hosted Windows Passed.
Hosted Linux, relinker, ASan, register-context, write-watch Skipped.
Exact-head C++ build/CTest Not run locally. The author reports 3,029/3,029 CTest cases passing on this head; I did not reproduce that run.
Unedited command output

pr_precheck.py:

/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13662-a6007ddfc369/report.md
/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13662-a6007ddfc369/report.json
Conclusion: checks failed

Missing helper errors from its isolated checkout:

/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13662-a6007ddfc369/head-a6007ddfc369-77b29a44/tools/pr_abi_audit.py': [Errno 2] No such file or directory
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13662-a6007ddfc369/head-a6007ddfc369-77b29a44/tools/pr_test_quality.py': [Errno 2] No such file or directory

Filtered direct ABI audit output:

status: passed
findings: 0
target: [{'name': 'X509_VERIFY_PARAM_set_flags_nid_postfix', 'computed_nid': '9E9Gr4FLIE4', 'declarations': ['core/libs/prx/libSceLibreSsl3/include/Api.hpp'], 'definitions': ['core/libs/prx/libSceLibreSsl3/src/X509VerifyParam.cpp'], 'explicit_aliases': [], 'version': 'not encoded by these source declarations; not verified'}]

Hosted-check command output:

[{"conclusion":"SUCCESS","name":"eligibility","status":"COMPLETED"},{"conclusion":"SUCCESS","name":"conventions","status":"COMPLETED"},{"conclusion":"SUCCESS","name":"library-portability","status":"COMPLETED"},{"conclusion":"SUCCESS","name":"intake","status":"COMPLETED"},{"conclusion":"SUCCESS","name":"labels","status":"COMPLETED"},{"conclusion":"SUCCESS","name":"report","status":"COMPLETED"},{"conclusion":"SKIPPED","name":"relinker","status":"COMPLETED"},{"conclusion":"SKIPPED","name":"relinker-asan","status":"COMPLETED"},{"conclusion":"SKIPPED","name":"register-context","status":"COMPLETED"},{"conclusion":"SKIPPED","name":"write-watch","status":"COMPLETED"},{"conclusion":"SKIPPED","name":"linux","status":"COMPLETED"},{"conclusion":"SUCCESS","name":"windows","status":"COMPLETED"}]

Negative control

Assertion Change to code under test Did the new test fail?
Setting EXPLICIT_POLICY leaves POLICY_CHECK clear Not run; exercising the alternate behavior requires an exact-head C++ binary. Not exercised locally; no build or CTest was run.

Findings

Blocking

EXPLICIT_POLICY behavior is version-dependent and unverified for the target export. This head ORs the supplied flags directly and its test asserts that EXPLICIT_POLICY does not set POLICY_CHECK. In pinned LibreSSL 2.5.4 and 3.0.2, EXPLICIT_POLICY is included in X509_V_FLAG_POLICY_MASK, and X509_VERIFY_PARAM_set_flags sets POLICY_CHECK for a policy-mask flag. LibreSSL 4.0.0 no longer has that side effect. The PR states that PS5 behavior has not been checked on console, and it uses the 2.5.4 parameter layout while selecting 4.0.0 flag semantics. Please provide pinned firmware/source evidence or a console result establishing the target behavior; otherwise implement and test the behavior supported by the target version. I will rerun the same checks on the new head.

Sources

Not verified

I did not build locally, run CTest, or test the export on a PS5/title. The target firmware's exact version behavior remains unknown. The author's test report also contains the full-suite inconsistency already raised in my earlier review. The combined landing of #13659 followed by #13662 was not repeated in this session; the prior review recorded conflicts, and no premature rebase is requested while the dependency remains open.

To get this to a good state

Establish the target's policy-flag behavior with firmware-pinned source or a console result, then align the implementation and regression assertion with that evidence. Also resolve the already-raised test-report inconsistency. I will rerun the same checks on the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5719694587 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13662#pullrequestreview-5719694587). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T23:17:31Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The test pins a LibreSSL 4.0.0 policy-flag behavior that is version-sensitive and has not been established for this PS5 export. ### What I ran Reviewed head `a6007ddfc3693473f34091736588b23026cab2aa` against PR base `9605300f293b88295e223a27ff8cfecf24d7ab2a`. The individual merge preview was clean against current `main` `06f47c0e81076834a0aaeca0ec9affad7d5fafd9`; the declared #13659 dependency head is not included, so this was not a combined-stack preview. Environment: Linux x86_64, Python 3.11.2; GCC 12.2.0 was available but not invoked. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13662 python3 tools/pr_abi_audit.py --base 9605300f293b88295e223a27ff8cfecf24d7ab2a --head a6007ddfc3693473f34091736588b23026cab2aa --json | python3 -c 'import json,sys; d=json.load(sys.stdin); print("status:",d.get("status")); print("findings:",len(d.get("findings",[]))); print("target:",[s for s in d.get("symbols",[]) if s.get("name")=="X509_VERIFY_PARAM_set_flags_nid_postfix"])' gh pr view 13662 --repo boykopovar/AnyPS5 --json statusCheckRollup --jq '[.statusCheckRollup[]|{name,status,conclusion}]' ``` ### Results | Check | Result | |---|---| | `git diff --check` | Passed in the exact-head precheck. | | Conventions and PR template | Passed locally and in hosted CI. | | ABI audit | Direct audit passed with no findings; the NID matched the declared export. The precheck's isolated copy lacked the workspace-only audit script. | | Test registration | The CMake target and CTest registration are present in the diff; the precheck's isolated copy lacked the test-quality helper. | | Current-main merge preview | Clean individually; the declared #13659 dependency remains open and is not included in this head. A prior sequential patch check recorded conflicts in shared CMake and debt files; this session did not repeat that composition check. | | Hosted eligibility, conventions, library-portability, intake, labels, report | Passed. | | Hosted Windows | Passed. | | Hosted Linux, relinker, ASan, register-context, write-watch | Skipped. | | Exact-head C++ build/CTest | Not run locally. The author reports 3,029/3,029 CTest cases passing on this head; I did not reproduce that run. | <details><summary>Unedited command output</summary> `pr_precheck.py`: ```text /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13662-a6007ddfc369/report.md /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13662-a6007ddfc369/report.json Conclusion: checks failed ``` Missing helper errors from its isolated checkout: ```text /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13662-a6007ddfc369/head-a6007ddfc369-77b29a44/tools/pr_abi_audit.py': [Errno 2] No such file or directory /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13662-a6007ddfc369/head-a6007ddfc369-77b29a44/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` Filtered direct ABI audit output: ```text status: passed findings: 0 target: [{'name': 'X509_VERIFY_PARAM_set_flags_nid_postfix', 'computed_nid': '9E9Gr4FLIE4', 'declarations': ['core/libs/prx/libSceLibreSsl3/include/Api.hpp'], 'definitions': ['core/libs/prx/libSceLibreSsl3/src/X509VerifyParam.cpp'], 'explicit_aliases': [], 'version': 'not encoded by these source declarations; not verified'}] ``` Hosted-check command output: ```text [{"conclusion":"SUCCESS","name":"eligibility","status":"COMPLETED"},{"conclusion":"SUCCESS","name":"conventions","status":"COMPLETED"},{"conclusion":"SUCCESS","name":"library-portability","status":"COMPLETED"},{"conclusion":"SUCCESS","name":"intake","status":"COMPLETED"},{"conclusion":"SUCCESS","name":"labels","status":"COMPLETED"},{"conclusion":"SUCCESS","name":"report","status":"COMPLETED"},{"conclusion":"SKIPPED","name":"relinker","status":"COMPLETED"},{"conclusion":"SKIPPED","name":"relinker-asan","status":"COMPLETED"},{"conclusion":"SKIPPED","name":"register-context","status":"COMPLETED"},{"conclusion":"SKIPPED","name":"write-watch","status":"COMPLETED"},{"conclusion":"SKIPPED","name":"linux","status":"COMPLETED"},{"conclusion":"SUCCESS","name":"windows","status":"COMPLETED"}] ``` </details> ### Negative control | Assertion | Change to code under test | Did the new test fail? | |---|---|---| | Setting `EXPLICIT_POLICY` leaves `POLICY_CHECK` clear | Not run; exercising the alternate behavior requires an exact-head C++ binary. | Not exercised locally; no build or CTest was run. | ### Findings #### Blocking `EXPLICIT_POLICY` behavior is version-dependent and unverified for the target export. This head ORs the supplied flags directly and its test asserts that `EXPLICIT_POLICY` does not set `POLICY_CHECK`. In pinned LibreSSL 2.5.4 and 3.0.2, `EXPLICIT_POLICY` is included in `X509_V_FLAG_POLICY_MASK`, and `X509_VERIFY_PARAM_set_flags` sets `POLICY_CHECK` for a policy-mask flag. LibreSSL 4.0.0 no longer has that side effect. The PR states that PS5 behavior has not been checked on console, and it uses the 2.5.4 parameter layout while selecting 4.0.0 flag semantics. Please provide pinned firmware/source evidence or a console result establishing the target behavior; otherwise implement and test the behavior supported by the target version. I will rerun the same checks on the new head. ### Sources - [This head's implementation](https://github.com/boykopovar/AnyPS5/blob/a6007ddfc3693473f34091736588b23026cab2aa/core/libs/prx/libSceLibreSsl3/src/X509VerifyParam.cpp#L10-L15) and [test assertion](https://github.com/boykopovar/AnyPS5/blob/a6007ddfc3693473f34091736588b23026cab2aa/core/libs/prx/libSceLibreSsl3/tests/X509VerifyParam.cpp#L48-L54). - [Parameter layout used by the implementation](https://github.com/boykopovar/AnyPS5/blob/9605300f293b88295e223a27ff8cfecf24d7ab2a/core/libs/prx/libSceLibreSsl/include/Api.hpp#L22-L34). - [LibreSSL 2.5.4 implementation](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/x509/x509_vpm.c#L407-L414) and [its policy-mask constants](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/x509/x509_vfy.h#L417-L421). - [LibreSSL 3.0.2 implementation](https://github.com/libressl/openbsd/blob/49a68803553e7feabe91ba07c6c45683be07e010/src/lib/libcrypto/x509/x509_vpm.c#L413-L420) and [its policy-mask constants](https://github.com/libressl/openbsd/blob/49a68803553e7feabe91ba07c6c45683be07e010/src/lib/libcrypto/x509/x509_vfy.h#L381-L420). - [LibreSSL 4.0.0 implementation](https://github.com/libressl/openbsd/blob/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/x509/x509_vpm.c#L386-L392). ### Not verified I did not build locally, run CTest, or test the export on a PS5/title. The target firmware's exact version behavior remains unknown. The author's test report also contains the full-suite inconsistency already raised in my earlier review. The combined landing of #13659 followed by #13662 was not repeated in this session; the prior review recorded conflicts, and no premature rebase is requested while the dependency remains open. ### To get this to a good state Establish the target's policy-flag behavior with firmware-pinned source or a console result, then align the implementation and regression assertion with that evidence. Also resolve the already-raised test-report inconsistency. I will rerun the same checks on the new head.
MarcZX10 commented 2026-10-31 16:57:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T16:57:32Z.

Review: APPROVED


Re-checked — new head, looks good

The updated implementation follows the shared behavior of the cited LibreSSL versions and leaves their version-dependent policy-flag case unmodified until console behavior is known.

What I ran

Reviewed head 0736525caca1e4c43ad49ada59e253da81cf0a07 against base 474030e58424fefdb65e5df9f3820810fbb4553c; the exact-head merge preview is clean against current main. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5. I did not invoke a compiler or build locally.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13662 --output-dir /tmp/anyps5-13662-update-precheck
python3 tools/pr_abi_audit.py --repo . --base 474030e58424fefdb65e5df9f3820810fbb4553c --head 0736525caca1e4c43ad49ada59e253da81cf0a07 --json
python3 tools/pr_stack_check.py 13662 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-13662-stack-current
gh pr checks 13662 -R boykopovar/AnyPS5

I inspected the exact implementation, guarded-parameter tests, CMake/CTest registration, debt note, and the author’s update. The declared earlier dependencies have merged; the current head has no declared dependencies.

Results

Check Result
Diff check Passed
Conventions and PR template Passed locally
ABI audit Passed with zero findings; the computed NID is 9E9Gr4FLIE4 and declaration/definition are present. This lexical audit does not prove binary ABI correctness or firmware version behavior.
Live dependency and mergeability preview Passed; clean against current main at 474030e58424fefdb65e5df9f3820810fbb4553c
Test registration and assertions Passed by source inspection; the new target is registered with CTest and checks both successful OR behavior and unchanged memory on the version-dependent throw path
Author-reported build and CTest The author reports a full Release build and ctest -j16 passing 3,062/3,062 on this exact head in Ubuntu 26.04 under WSL2 with GCC 15.2.0. I did not independently reproduce it.
Hosted checks conventions, library-portability, eligibility, and report passed; labels and windows were pending at the final snapshot. Linux, register-context, relinker, relinker-asan, and write-watch were skipped.
Local C++ build/CTest and console behavior Not run
Unedited local check output

Conventions stdout:

All conventions checks passed.

Filtered ABI audit output:

status: passed
findings: 0
target: [{'name': 'X509_VERIFY_PARAM_set_flags_nid_postfix', 'computed_nid': '9E9Gr4FLIE4', 'declarations': ['core/libs/prx/libSceLibreSsl3/include/Api.hpp'], 'definitions': ['core/libs/prx/libSceLibreSsl3/src/X509VerifyParam.cpp'], 'explicit_aliases': [], 'version': 'not encoded by these source declarations; not verified'}]

Current hosted-check output:

labels	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41221844938/job/124598433933
conventions	pass	22s	https://github.com/boykopovar/AnyPS5/actions/runs/41221845045/job/124597853898
library-portability	pass	1m42s	https://github.com/boykopovar/AnyPS5/actions/runs/41221774443/job/124597642397
windows	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41221774505/job/124598167139
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41221774505/job/124598168122
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41221774505/job/124598168296
relinker	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41221774505/job/124598167922
relinker-asan	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41221774505/job/124598168485
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41221774505/job/124598168298
eligibility	pass	7s	https://github.com/boykopovar/AnyPS5/actions/runs/41221774505/job/124597642589
report	pass	1m6s	https://github.com/boykopovar/AnyPS5/actions/runs/41221774455/job/124597642297

The precheck’s ABI and test-quality helper invocations could not run in its isolated checkout because those workspace-only scripts are absent there. I ran the ABI audit directly above; I manually inspected the tests. The precheck recorded the diff, conventions, and live mergeability checks as passed.

Findings

Blocking

None found in the updated head.

Non-blocking

The console’s behavior for the policy-flag combination that differs between LibreSSL 2.5.4 and 4.0.0 remains unknown. The PR records this in the debt entry and safely leaves those parameters unchanged by throwing rather than asserting either version’s behavior.

Sources

Not verified

  • I did not independently reproduce the reported 3,062-test run.
  • The exact PS5 firmware behavior for the documented version-dependent case has not been measured.
  • Windows hosted checks were still pending; several specialized workflows were skipped.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5723904642 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13662#pullrequestreview-5723904642). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T16:57:32Z. **Review:** APPROVED --- # Re-checked — new head, looks good The updated implementation follows the shared behavior of the cited LibreSSL versions and leaves their version-dependent policy-flag case unmodified until console behavior is known. ## What I ran Reviewed head `0736525caca1e4c43ad49ada59e253da81cf0a07` against base `474030e58424fefdb65e5df9f3820810fbb4553c`; the exact-head merge preview is clean against current `main`. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5. I did not invoke a compiler or build locally. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13662 --output-dir /tmp/anyps5-13662-update-precheck python3 tools/pr_abi_audit.py --repo . --base 474030e58424fefdb65e5df9f3820810fbb4553c --head 0736525caca1e4c43ad49ada59e253da81cf0a07 --json python3 tools/pr_stack_check.py 13662 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-13662-stack-current gh pr checks 13662 -R boykopovar/AnyPS5 ``` I inspected the exact implementation, guarded-parameter tests, CMake/CTest registration, debt note, and the author’s update. The declared earlier dependencies have merged; the current head has no declared dependencies. ## Results | Check | Result | |---|---| | Diff check | Passed | | Conventions and PR template | Passed locally | | ABI audit | Passed with zero findings; the computed NID is `9E9Gr4FLIE4` and declaration/definition are present. This lexical audit does not prove binary ABI correctness or firmware version behavior. | | Live dependency and mergeability preview | Passed; clean against current `main` at `474030e58424fefdb65e5df9f3820810fbb4553c` | | Test registration and assertions | Passed by source inspection; the new target is registered with CTest and checks both successful OR behavior and unchanged memory on the version-dependent throw path | | Author-reported build and CTest | The author reports a full Release build and `ctest -j16` passing 3,062/3,062 on this exact head in Ubuntu 26.04 under WSL2 with GCC 15.2.0. I did not independently reproduce it. | | Hosted checks | `conventions`, `library-portability`, `eligibility`, and `report` passed; `labels` and `windows` were pending at the final snapshot. Linux, register-context, relinker, relinker-asan, and write-watch were skipped. | | Local C++ build/CTest and console behavior | Not run | <details><summary>Unedited local check output</summary> Conventions stdout: ```text All conventions checks passed. ``` Filtered ABI audit output: ```text status: passed findings: 0 target: [{'name': 'X509_VERIFY_PARAM_set_flags_nid_postfix', 'computed_nid': '9E9Gr4FLIE4', 'declarations': ['core/libs/prx/libSceLibreSsl3/include/Api.hpp'], 'definitions': ['core/libs/prx/libSceLibreSsl3/src/X509VerifyParam.cpp'], 'explicit_aliases': [], 'version': 'not encoded by these source declarations; not verified'}] ``` Current hosted-check output: ```text labels pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41221844938/job/124598433933 conventions pass 22s https://github.com/boykopovar/AnyPS5/actions/runs/41221845045/job/124597853898 library-portability pass 1m42s https://github.com/boykopovar/AnyPS5/actions/runs/41221774443/job/124597642397 windows pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41221774505/job/124598167139 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41221774505/job/124598168122 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41221774505/job/124598168296 relinker skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41221774505/job/124598167922 relinker-asan skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41221774505/job/124598168485 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41221774505/job/124598168298 eligibility pass 7s https://github.com/boykopovar/AnyPS5/actions/runs/41221774505/job/124597642589 report pass 1m6s https://github.com/boykopovar/AnyPS5/actions/runs/41221774455/job/124597642297 ``` The precheck’s ABI and test-quality helper invocations could not run in its isolated checkout because those workspace-only scripts are absent there. I ran the ABI audit directly above; I manually inspected the tests. The precheck recorded the diff, conventions, and live mergeability checks as passed. </details> ## Findings ### Blocking None found in the updated head. ### Non-blocking The console’s behavior for the policy-flag combination that differs between LibreSSL 2.5.4 and 4.0.0 remains unknown. The PR records this in the debt entry and safely leaves those parameters unchanged by throwing rather than asserting either version’s behavior. ## Sources - [Implementation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/0736525caca1e4c43ad49ada59e253da81cf0a07/core/libs/prx/libSceLibreSsl3/src/X509VerifyParam.cpp) - [Regression tests at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/0736525caca1e4c43ad49ada59e253da81cf0a07/core/libs/prx/libSceLibreSsl3/tests/X509VerifyParam.cpp) - [LibreSSL 2.5.4 `X509_VERIFY_PARAM_set_flags`](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/x509/x509_vpm.c#L407-L414) - [LibreSSL 4.0.0 `X509_VERIFY_PARAM_set_flags`](https://github.com/libressl/openbsd/blob/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/x509/x509_vpm.c#L386-L392) ## Not verified - I did not independently reproduce the reported 3,062-test run. - The exact PS5 firmware behavior for the documented version-dependent case has not been measured. - Windows hosted checks were still pending; several specialized workflows were skipped.
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!13662
No description provided.