Skip to content

feat(libSceLibreSsl3): implement numeric object identifier text parsing - #181

Draft
Thimo188 wants to merge 6 commits into
mainfrom
upstream-pr/12315
Draft

Thimo188 wants to merge 6 commits into
mainfrom
upstream-pr/12315

Conversation

@Thimo188

@Thimo188 Thimo188 commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Imported from boykopovar/AnyPS5#12315, originally opened by Ninot1Quyi.

Source commit: 2ed4f784045b3bd2489fe99dae67be0004a27dda. The import branch preserves this fetched upstream PR snapshot. The description and validation below are copied from upstream; no new code changes or test runs were made for this import. Original reviews, discussions, and attachments remain at the linked upstream PR.


What

Implements OBJ_txt2obj in libSceLibreSsl3 using the contracts and object metadata from LibreSSL 4.0.0 at ce488b78e0bd994780569df718596b9776ff681a.

  • Resolves short and long names against a separate 1,056-entry LibreSSL3 object table with 1,049 entries in each name index, keeping it separate from the older module's table.
  • Encodes numeric OIDs, including the reference's separators, rejection reasons and uint64 arithmetic. Parse failures use the existing LibreSSL error queue; null text throws.
  • Allocates numeric objects and OID data on the guest heap with ownership flags 9, and adds focused coverage for names, numeric boundaries, error state and allocation failures.

Public destruction depends on boykopovar#10461, which is still open. The focused parser test releases its allocations directly and does not establish constructor/destructor interoperability through ASN1_OBJECT_free. PS5 object layout, cross-module error-queue sharing and allocator/ABI interoperability remain unverified and are recorded in docs/dev/debt/libSceLibreSsl3.md.

Submission-time python3 tools/pr_overlap.py --repo boykopovar/AnyPS5 --base main --branch feat/libressl3-object-text completed against 1,383 open PRs at main a57567928d2c0bac40aaf81f3ad4b189d49d0b8f. It found no duplicate export or new file, and shared-line edits with boykopovar#10452, boykopovar#10461, boykopovar#10490, boykopovar#10491, boykopovar#10493, boykopovar#10557, boykopovar#10631 and boykopovar#10960, principally in CMake and the debt record; boykopovar#10631 also changes the adjacent OBJ_cmp declaration/stub. boykopovar#9970 conflicts with main and could not be automatically compared; manual inspection of its shared-file diff confirms it implements OpenSSL_version and adjusts its test/debt entries, without implementing OBJ_txt2obj. The subsequent main updates through 284a487cd978824f442955918ec0f99ab9c556d3 do not change these library files or the contribution/CI rules. Shared-file merge order remains to be coordinated with their authors; boykopovar#10461 is the functional lifecycle prerequisite and declares its own dependencies on boykopovar#9970 and boykopovar#10452.

Tested

The cloud validation below applies to commit 56f4e91f047af073b6b282bb48f66f4cd6d8b6e3, based on upstream b99bbebacd1d19e5be08f7858ac48527452bc4ba. For submission, the branch was rebased without conflicts onto 284a487cd978824f442955918ec0f99ab9c556d3; git range-diff confirms the patch is unchanged at 3636321d09342a04fe4bff55ccd6f6a8dfcf612a. The full build/runtime suite has not been rerun on the rebased commit.

  • Linux Release default full build: passed. Explicit libs build: passed.
  • Full CTest run: 2,651 tests; 2,404 passed, 130 failed, 117 skipped. These are the original results; neither failures nor skips are counted as passes.
  • autorun_exit_status passed a separate rerun after normalizing the build-environment permissions and adding umask 022 to its setup script. The original full-run totals remain unchanged; 129 failures still have no passing result.
  • guest_crypto_memcmp, all four guest_libressl3_* tests (including guest_libressl3_object_parser) and public_headers: passed.
  • Test-registration audit, diff whitespace check and contribution-conventions check: passed in the cloud validation.
  • Independent comparison against the pinned LibreSSL reference: 500,000 numeric OIDs and 2,098 name queries matched outputs and errors. Numeric comparisons also passed AddressSanitizer and UndefinedBehaviorSanitizer. All object-table fields, bytes and indexes matched.
  • Submission-time local checks: the source registration audit (python3 tools/check_test_registration.py --scripts) found all 209 test scripts registered; git diff --check origin/main...HEAD passed; python3 tools/check_conventions.py --base origin/main reported 0 errors and one debt-entry-length warning. The original Linux logs are retained in the cloud workspace; they are not attached here.

An independent self-process syscall probe in the cloud environment returned ENOSYS (38) for process_vm_readv, process_vm_writev and userfaultfd. The outstanding failures were classified as follows:

Remaining failures Count Evidence
Process-memory read/write syscalls unavailable 93 Test logs explicitly report ENOSYS; includes one AGC storage_file_write test
AGC write-tracking capability unavailable 35 29 directly report the missing prerequisite; 6 depend on write tracking according to the relevant source paths
guest_credentials 1 Source inference: the process_vm_writev failure return matches the failed assertion; its log does not print errno

check_skips.py --require-tests rejected 15 of the 117 skips; these also require the missing write-tracking capability. The other skips being allowed by policy does not mean those tests ran successfully. These findings explain the environment blocker, but do not guarantee that every assertion will pass in CI. No tests were disabled and no product behavior was changed to hide these failures.

Windows, PS5 hardware, actual game execution, physical GPUs and cross-module ABI interoperability have no passing result from this work.

Original cloud commands and log locations
source /workspace/.onboarding/activate.sh
cd /workspace/AnyPS5
umask 022
cmake --build build --parallel 4
cmake --build build --target libs --parallel 4
ANYPS5_REQUIRE_VULKAN=1 GALLIUM_OVERRIDE_CPU_CAPS=avx ctest --test-dir build --parallel 4 --output-on-failure --timeout 120 --no-tests=error --output-log /workspace/.onboarding/full-ctest.log --output-junit /workspace/.onboarding/full-ctest.xml
python3 tools/check_skips.py /workspace/.onboarding/full-ctest.xml --require-tests

Cloud workspace records:

  • /workspace/.onboarding/full-build.log
  • /workspace/.onboarding/full-libs-build.log
  • /workspace/.onboarding/full-ctest.log
  • /workspace/.onboarding/full-ctest.xml
  • /workspace/.onboarding/full-failures.txt
  • /workspace/.onboarding/autorun-recheck.xml

Maintainer CI request: please run the upstream Build workflow for this PR's merge with current main, with full=true, linux=true and select=false, so both full Linux and Windows jobs run without PR-based test selection. This account has no upstream write permission; the Linux job requires the upstream self-hosted anyps5 runner.

gh workflow run build.yml --repo boykopovar/AnyPS5 --ref main --field pr=12315 --field full=true --field linux=true --field select=false

Please verify the tested head/merge commit, that both jobs actually execute, and their CTest and skip-policy results. A partial set of green checks does not establish full validation. Any subsequent commits require another full run. Please also confirm boykopovar#10461 is satisfied before merging.

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: feat(libSceLibreSsl3): implement ASN1_OBJECT_free boykopovar/AnyPS5#10461
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Replace the earlier source-guided port and generated name directory with a numeric parser written from public API observations. Name lookup remains explicitly unimplemented.
Resolve the pending-export debt conflict while preserving main's RSA_up_ref and the numeric-only OBJ_txt2obj limitations. Parser implementation and fixture are unchanged.

Validation: compile production NumericObject.cpp with the ObjectParser fixture on Linux/GCC 13.3, linked to the existing built guest libraries; all parser checks pass. Conventions, script registration (230 scripts), public-header audit (394 libraries / 24929 exports) and diff whitespace against current main pass. No fresh full product build or console verification is claimed.

The PR remains draft: its description still documents the removed parser and name table. The current code uses numeric public-API observations and leaves name lookup unimplemented. Public ASN1_OBJECT_free interoperability remains dependent on boykopovar#10461.
Merge main 90cc8d5. Preserve
main's three PKEY getter exclusions and count of 77 pending exports,
while retaining the numeric OBJ_txt2obj partial-implementation debt.
The numeric parser, its tests and observation script are unchanged.

Validation: conventions, diff checks and 235 script registrations pass.
The existing ObjectParser regression passes with production NumericObject
and Error sources in an isolated allocator/NotImplemented adapter harness;
the same harness passes ASan/UBSan with detect_leaks=0. Full product
build, full CTest, LSan and console validation were not rerun.
PR remains draft pending boykopovar#10461.
Preserve both OID parsing and OpenSSL version test registrations and their Windows DLL paths and original timeouts. Keep main's OpenSSL_version implementation/debt and the partial OBJ_txt2obj inventory wording.

NumericObject.cpp, ObjectParser.cpp and the observation script are unchanged. Production-source regression and ASan/UBSan (detect_leaks=0), conventions, script-registration audit, and a focused CMake registration probe passed. Full product build, guest-linked tests, LSan and other platforms were not rerun for this merge. PR remains draft pending boykopovar#10461.
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Conflicts with main, rebase needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants