feat(libSceNKWebKit): answer 128 exports whose 11.00 body is a bare ret #23753

Merged
edubox merged 4 commits from upstream-pr/23753 into main 2026-11-24 08:03:31 +00:00
edubox commented 2026-11-19 15:53:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by edubox on 2026-11-19T15:53:02Z.


What

One hundred and twenty-eight libSceNKWebKit exports whose body in the 11.00 module is a single ret byte stop throwing. They are empty void functions, the same shape as the no-ops src/NoOpExports.cpp already holds: WKPageSetUserContentExtensionsEnabled, the JSDOMRectList, JSAudioTrack and JSAnimationTimeline finishCreation hooks, the FrameLoaderClient and EmptyFrameLoaderClient notifications, the LibWebRTCProvider setters and the rest of the list below.

Evidence: the decrypted 11.00 libSceNKWebKit.sprx (SHA-256 3af992253665387feeb5df90ff27dff683e3aa270cc4d92a0535b46ab18fa20d), the same image the constant exports were read from. Each of them has one byte, 0xC3 (ret), at its export address, so the module reads no argument and writes no return value. Declaring them void reproduces that; answering a constant would invent the register contents a caller reads back.

The definitions moved from Export.cpp to src/NoOpExports.cpp, and their declarations in include/Api.hpp, include/InventoryExports.hpp and include/LegacyExports.hpp changed from int to void to match. The return type is not part of the mangled name, so the exports are unchanged.

Rebased onto main dfe428e798. Two things changed with it:

  • main now has src/NoOpExports.cpp itself, with the 170 no-ops this branch used to move; the diff adds only the 128 it still lacks.
  • Twenty Inspector::Protocol::BindingTraits::assertValueHasExpectedType instantiations that 11.00 answers with ret are implemented in main with an argument (src/InspectorBindingTraits.cpp), so they are left to that implementation instead of being redeclared here.
The 128 exports

WKPageSetUserContentExtensionsEnabled, _ZN7WebCore13JSDOMRectList14finishCreationERN3JSC2VME, _ZN7WebCore22EmptyFrameLoaderClient31dispatchDecidePolicyForResponseERKNS_16ResourceResponseERKNS_15ResourceRequestENS_21PolicyCheckIdentifierERKN3WTF6StringEONS8_8FunctionIFvNS_12PolicyActionES7_EEE, _ZN7WebCore17FrameLoaderClient31dispatchDidReachLayoutMilestoneEN3WTF9OptionSetINS_15LayoutMilestoneEEE, _ZN7WebCore17LibWebRTCProvider9setActiveEb, and the other 123 in the diff.

Tested

Linux x86-64 (CachyOS), GCC 16.2.1, Release, BUILD_TESTING=ON, on main dfe428e798:

  • libSceNKWebKit builds, and a new nkwebkit_emptyexports test (globbed from tests/EmptyExports.cpp) calls all 128 and passes.
  • Negative control: making one of the 128 abort makes the test fail (Subprocess aborted), so the calls reach the definitions instead of being folded away; reverted.
  • nm -D on the built libSceNKWebKit.prx lists the 128 names, and every one of them is defined once, in src/NoOpExports.cpp.
  • check_conventions.py --base origin/main passes.

Not tested on a console beyond the module bodies, and no title in the 57 dumped registries imports this library.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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:5398230319 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23753). Originally posted by [edubox](https://github.com/edubox) on 2026-11-19T15:53:02Z. --- ### What One hundred and twenty-eight `libSceNKWebKit` exports whose body in the 11.00 module is a single `ret` byte stop throwing. They are empty `void` functions, the same shape as the no-ops `src/NoOpExports.cpp` already holds: `WKPageSetUserContentExtensionsEnabled`, the `JSDOMRectList`, `JSAudioTrack` and `JSAnimationTimeline` `finishCreation` hooks, the `FrameLoaderClient` and `EmptyFrameLoaderClient` notifications, the `LibWebRTCProvider` setters and the rest of the list below. Evidence: the decrypted 11.00 `libSceNKWebKit.sprx` (SHA-256 `3af992253665387feeb5df90ff27dff683e3aa270cc4d92a0535b46ab18fa20d`), the same image the constant exports were read from. Each of them has one byte, `0xC3` (`ret`), at its export address, so the module reads no argument and writes no return value. Declaring them `void` reproduces that; answering a constant would invent the register contents a caller reads back. The definitions moved from `Export.cpp` to `src/NoOpExports.cpp`, and their declarations in `include/Api.hpp`, `include/InventoryExports.hpp` and `include/LegacyExports.hpp` changed from `int` to `void` to match. The return type is not part of the mangled name, so the exports are unchanged. Rebased onto `main` `dfe428e798`. Two things changed with it: - `main` now has `src/NoOpExports.cpp` itself, with the 170 no-ops this branch used to move; the diff adds only the 128 it still lacks. - Twenty `Inspector::Protocol::BindingTraits::assertValueHasExpectedType` instantiations that 11.00 answers with `ret` are implemented in `main` with an argument (`src/InspectorBindingTraits.cpp`), so they are left to that implementation instead of being redeclared here. <details> <summary>The 128 exports</summary> `WKPageSetUserContentExtensionsEnabled`, `_ZN7WebCore13JSDOMRectList14finishCreationERN3JSC2VME`, `_ZN7WebCore22EmptyFrameLoaderClient31dispatchDecidePolicyForResponseERKNS_16ResourceResponseERKNS_15ResourceRequestENS_21PolicyCheckIdentifierERKN3WTF6StringEONS8_8FunctionIFvNS_12PolicyActionES7_EEE`, `_ZN7WebCore17FrameLoaderClient31dispatchDidReachLayoutMilestoneEN3WTF9OptionSetINS_15LayoutMilestoneEEE`, `_ZN7WebCore17LibWebRTCProvider9setActiveEb`, and the other 123 in the diff. </details> ### Tested Linux x86-64 (CachyOS), GCC 16.2.1, Release, `BUILD_TESTING=ON`, on `main` `dfe428e798`: - `libSceNKWebKit` builds, and a new `nkwebkit_emptyexports` test (globbed from `tests/EmptyExports.cpp`) calls all 128 and passes. - Negative control: making one of the 128 abort makes the test fail (`Subprocess aborted`), so the calls reach the definitions instead of being folded away; reverted. - `nm -D` on the built `libSceNKWebKit.prx` lists the 128 names, and every one of them is defined once, in `src/NoOpExports.cpp`. - `check_conventions.py --base origin/main` passes. Not tested on a console beyond the module bodies, and no title in the 57 dumped registries imports this library. ### Checklist - [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) and the licence notice of code adapted from upstream (see AGENTS.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
PrivacyOnion commented 2026-11-19 15:58:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-19T15:58:13Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against f297ab5e68:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_nkwebkit_empty_exports_tests built cleanly.
  • CTest (guest_nkwebkit_empty_exports):
    1/1 Test #4606: guest_nkwebkit_empty_exports .....   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/Api.hpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp, core/libs/prx/libSceNKWebKit/src/NoOpExports.cpp reverted to main and the new tests kept, the suite fails:
    1/1 Test #4606: guest_nkwebkit_empty_exports .....Subprocess aborted***Exception:   0.21 sec
    0% tests passed, 1 tests failed out of 1
    
    Restoring the change makes it pass again.
  • Code reading:
    • Verified that the 150 exports whose PS5 11.00 binary implementation is a single 0xC3 (ret) byte are accurately declared as void returning no-ops without synthetic return values.
    • Verified moving no-op exports from Export.cpp to src/NoOpExports.cpp matches existing repository patterns in libSceNKWebKit (which already contained 177 similar no-ops).
    • Verified signature updates in Api.hpp, InventoryExports.hpp, and LegacyExports.hpp consistently match the new void return type.
    • Verified CMakeLists.txt target definition and test registration for guest_nkwebkit_empty_exports_tests, including Windows unwind and PATH configuration.
    • Verified GuestNkWebKitEmptyExports.cpp test invocation cleanly links, executes, and confirms the functions do not throw or trigger NotImplemented_nid_no_patch.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5978520259 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23753#pullrequestreview-5978520259). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-19T15:58:13Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `f297ab5e68`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_nkwebkit_empty_exports_tests` built cleanly. - **CTest** (`guest_nkwebkit_empty_exports`): ``` 1/1 Test #4606: guest_nkwebkit_empty_exports ..... Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceNKWebKit/Export.cpp`, `core/libs/prx/libSceNKWebKit/include/Api.hpp`, `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp`, `core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp`, `core/libs/prx/libSceNKWebKit/src/NoOpExports.cpp` reverted to `main` and the new tests kept, the suite fails: ``` 1/1 Test #4606: guest_nkwebkit_empty_exports .....Subprocess aborted***Exception: 0.21 sec 0% tests passed, 1 tests failed out of 1 ``` Restoring the change makes it pass again. - **Code reading**: - Verified that the 150 exports whose PS5 11.00 binary implementation is a single 0xC3 (ret) byte are accurately declared as void returning no-ops without synthetic return values. - Verified moving no-op exports from Export.cpp to src/NoOpExports.cpp matches existing repository patterns in libSceNKWebKit (which already contained 177 similar no-ops). - Verified signature updates in Api.hpp, InventoryExports.hpp, and LegacyExports.hpp consistently match the new void return type. - Verified CMakeLists.txt target definition and test registration for guest_nkwebkit_empty_exports_tests, including Windows unwind and PATH configuration. - Verified GuestNkWebKitEmptyExports.cpp test invocation cleanly links, executes, and confirms the functions do not throw or trigger NotImplemented_nid_no_patch. Looks Good To Me
MarcZX10 commented 2026-11-19 16:11:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T16:11:35Z.

Review: COMMENTED


Reviewed — comments

The review of head f297ab5e6898c78818e68cca8c0857cb8c61b12f is incomplete because two large changed files were not fully read, so a formal approval is not justified.

What I ran

No commands or tests were run. I read the prepared description, commit summary, manifest, diff, and targeted source ranges through repo_read.py.

Results

Check Result Note
Source review not run Two large files were not fully reviewed
Tests not run No tests were run during this review

Findings

Blocking

None verified in the code read.

Non-blocking

None.

Not verified

The full contents of core/libs/prx/libSceNKWebKit/Export.cpp and core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp were not read. The latter was inspected only at one targeted range. No tests, build, console behavior, or author-reported results were independently verified.

Read: description.md, commits.md, manifest.json, diff.patch; changed-file ranges in CMakeLists.txt, Api.hpp, LegacyExports.hpp, NoOpExports.cpp, GuestNkWebKitEmptyExports.cpp, and feat-nkwebkit-empty-exports.md; one targeted range in InventoryExports.hpp.

Excluded from full review: Export.cpp and InventoryExports.hpp (too large for the review folder; only a targeted range of the latter was read).

To get this to a good state

Nothing is required. Optional: complete review of the two large changed files and run the relevant build and tests before seeking a formal decision.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5978779628 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23753#pullrequestreview-5978779628). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T16:11:35Z. **Review:** COMMENTED --- # Reviewed — comments The review of head `f297ab5e6898c78818e68cca8c0857cb8c61b12f` is incomplete because two large changed files were not fully read, so a formal approval is not justified. ## What I ran No commands or tests were run. I read the prepared description, commit summary, manifest, diff, and targeted source ranges through `repo_read.py`. ## Results | Check | Result | Note | |---|---|---| | Source review | not run | Two large files were not fully reviewed | | Tests | not run | No tests were run during this review | ## Findings ### Blocking None verified in the code read. ### Non-blocking None. ## Not verified The full contents of `core/libs/prx/libSceNKWebKit/Export.cpp` and `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp` were not read. The latter was inspected only at one targeted range. No tests, build, console behavior, or author-reported results were independently verified. Read: `description.md`, `commits.md`, `manifest.json`, `diff.patch`; changed-file ranges in `CMakeLists.txt`, `Api.hpp`, `LegacyExports.hpp`, `NoOpExports.cpp`, `GuestNkWebKitEmptyExports.cpp`, and `feat-nkwebkit-empty-exports.md`; one targeted range in `InventoryExports.hpp`. Excluded from full review: `Export.cpp` and `InventoryExports.hpp` (too large for the review folder; only a targeted range of the latter was read). ## To get this to a good state Nothing is required. Optional: complete review of the two large changed files and run the relevant build and tests before seeking a formal decision.
MarcZX10 commented 2026-11-20 17:32:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T17:32:07Z.

Review: COMMENTED


Reviewed — no blocking findings

The implementation matches the stated no-op behavior, with a non-blocking export-count discrepancy in its debt note.

What I ran

Reviewed head 00e5aa16a2bda180d4e38425d599f90b3551ed9a using the prepared diff and pinned repo_read.py; no build or tests were run.

Results

Check Result Note
Diff and targeted source review passed No concrete runtime defect found
Build and tests not run PR description reports Linux results; not independently verified
Console behavior not run Description says no console testing beyond module bodies

Findings

Blocking

None.

Non-blocking

  • docs/dev/debt/changes/feat-nkwebkit-empty-exports.md:5 says 148 exports, while the PR title and description claim 150. Please reconcile the count.

Not verified

The source reader provided the full text for the changed files listed as included in the manifest. Export.cpp and include/InventoryExports.hpp were excluded from the review folder as too large; only relevant diff hunks were inspected for Export.cpp, and selected declaration ranges were inspected for InventoryExports.hpp. Build/test, CI, binary symbol listing, and console behavior were not independently verified. The prepared review bundle did not expose files.json, so exclusions are reported from the manifest.

To get this to a good state

Nothing is required. Optional: reconcile the export count in the debt note with the implementation and PR description.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5996830115 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23753#pullrequestreview-5996830115). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T17:32:07Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The implementation matches the stated no-op behavior, with a non-blocking export-count discrepancy in its debt note. ## What I ran Reviewed head `00e5aa16a2bda180d4e38425d599f90b3551ed9a` using the prepared diff and pinned `repo_read.py`; no build or tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | No concrete runtime defect found | | Build and tests | not run | PR description reports Linux results; not independently verified | | Console behavior | not run | Description says no console testing beyond module bodies | ## Findings ### Blocking None. ### Non-blocking - `docs/dev/debt/changes/feat-nkwebkit-empty-exports.md:5` says 148 exports, while the PR title and description claim 150. Please reconcile the count. ## Not verified The source reader provided the full text for the changed files listed as included in the manifest. `Export.cpp` and `include/InventoryExports.hpp` were excluded from the review folder as too large; only relevant diff hunks were inspected for `Export.cpp`, and selected declaration ranges were inspected for `InventoryExports.hpp`. Build/test, CI, binary symbol listing, and console behavior were not independently verified. The prepared review bundle did not expose `files.json`, so exclusions are reported from the manifest. ## To get this to a good state Nothing is required. Optional: reconcile the export count in the debt note with the implementation and PR description.
MarcZX10 commented 2026-11-22 04:50:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T04:50:32Z.

Review: COMMENTED


Reviewed — no blocking findings

The reviewed portions show no concrete blocking defect, but the review is incomplete because some changed lines and files were not read.

What I ran

Head: 2a1e02f1dcb4224af8c65df6b58c157fa19b2a89. No build or tests were run. The author reports Linux x86-64 tests and checks in description.md; those results were not independently verified.

Results

Check Result Note
Code inspection not run Partial review only
Build and tests not run Author reported results only

Findings

Blocking

None identified in the portions read.

Non-blocking

None.

Not verified

I read description.md, commits.md, manifest.json, README.md, and the changed lines shown for CMakeLists.txt, Api.hpp, LegacyExports.hpp, NoOpExports.cpp, GuestNkWebKitEmptyExports.cpp, and the debt change note. I also inspected portions of diff.patch. I did not read every added line in LegacyExports.hpp or NoOpExports.cpp; Export.cpp and InventoryExports.hpp were excluded from the review folder and their contents were not read. I could not verify the claimed 11.00 module bytes, export inventory, or author-reported checks.

To get this to a good state

Nothing is required. Optional: complete inspection of the unread changed lines and excluded files, then verify the reported build and tests before making a formal decision.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6010439795 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23753#pullrequestreview-6010439795). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T04:50:32Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The reviewed portions show no concrete blocking defect, but the review is incomplete because some changed lines and files were not read. ## What I ran Head: `2a1e02f1dcb4224af8c65df6b58c157fa19b2a89`. No build or tests were run. The author reports Linux x86-64 tests and checks in `description.md`; those results were not independently verified. ## Results | Check | Result | Note | |---|---|---| | Code inspection | not run | Partial review only | | Build and tests | not run | Author reported results only | ## Findings ### Blocking None identified in the portions read. ### Non-blocking None. ## Not verified I read `description.md`, `commits.md`, `manifest.json`, `README.md`, and the changed lines shown for `CMakeLists.txt`, `Api.hpp`, `LegacyExports.hpp`, `NoOpExports.cpp`, `GuestNkWebKitEmptyExports.cpp`, and the debt change note. I also inspected portions of `diff.patch`. I did not read every added line in `LegacyExports.hpp` or `NoOpExports.cpp`; `Export.cpp` and `InventoryExports.hpp` were excluded from the review folder and their contents were not read. I could not verify the claimed 11.00 module bytes, export inventory, or author-reported checks. ## To get this to a good state Nothing is required. Optional: complete inspection of the unread changed lines and excluded files, then verify the reported build and tests before making a formal decision.
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!23753
No description provided.