feat(libSceNKWebKit): store the measured fields #14391
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14391"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by edubox on 2026-11-01T11:15:43Z.
What
Implement 55 libSceNKWebKit exports that store an argument into a fixed field of the object in the PS5 11.00 module:
SQLiteStatementAutoResetScope,ProtoCallFrame::setCodeBlock, ...).ProtoCallFrame,GraphicsLayer::setClient,TextureMapperLayer::setBackingStore/setContentsLayer,ApplicationCacheStorage::setMaximumSize/setDefaultOriginQuota,InspectorConsoleAgent::setHeapAgent).RemoteControllableTarget::setTargetIdentifier,ProtoCallFrame::setArgumentCountIncludingThis/setPaddedArgCount).The bodies, sizes and offsets come from the 11.00
libSceNKWebKit.sprx(SHA-2563af992253665387feeb5df90ff27dff683e3aa270cc4d92a0535b46ab18fa20d). The 55 declarations now carry these definitions' signatures ininclude/FieldSettersExports.hpp, which the umbrella header reaches; the no-parameter placeholders are gone fromInventoryExports.hppand the test no longer redeclares them. Object layouts, field meanings, wider values and other ABI cases are unverified, so only the measured store width is covered.The per-export measurement record (module fingerprint and store width/offset for each export) is in https://gist.github.com/edubox/bf9fdb5fa43930e1404a19621623cea9.
The debt counts drop by these 55 additional-callable rows: 7,311 of 8,703 remain; the known-name group stays at 127.
Tested
mainab6f5d32ed: all NKWebKit tests 10/10, including the newnkwebkit_fieldsetters, which calls every setter with a sentinel and checks that only the measured field bytes change.python3 tools/check_conventions.py --base origin/main: passed.git diff --check: clean.python3 tools/pr_overlap.py --branch feat/nkwebkit-field-setters --jobs 32: no overlap with open pull requests.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Measurement record
The 55 store widths and offsets, with the 11.00 module SHA-256, are listed in this gist: https://gist.github.com/edubox/5779a2e70dbec6a3ecb1f5de9d49b8bc
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T14:33:00Z.
Review: COMMENTED
Reviewed — no blocking findings
The 55 field setters are simple stores at the offsets the PR gives, and they match the test; they write through the object pointer with no null or writability check, so a bad object pointer from a title crashes the host, which is the class of problem other PRs in this queue are fixing. The firmware offsets were not checked here.
What I ran
12db53231df734606b7e964d04da7842202d3150, base929e8d8442(the precheck base)./usr/bin/python33.11.2, no build.python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14391 --output-dir /dev/shm/reviewer-run/precheck/14391python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base 929e8d8442 --head 12db53231df734606b7e964d04da7842202d3150 --json(exit 0;passed; 0 findings; 10,105 symbols).core/libs/prx/libSceNKWebKit/tests/FieldSetters.cppfrom a head extract: one literal-path registration heuristic.src/FieldSetters.cpp(227 lines, the store functions at the offsets listed in the PR) and a repository search incore/libs/prx/libSceNKWebKitfor raw field writes through an object pointer: at headFieldSetters.cppis the only file that does this, and the library has noGuestArena::HostWriteorGuestCopyOutcalls.Results
Precheck report, checks table, unedited (
/dev/shm/reviewer-run/precheck/14391/report.md):The precheck deliberately does not configure, build, or compile AnyPS5.git diff --check 929e8d8442bb23635f7a55ff3e1232cdcd52c379...12db53231df734606b7e964d04da7842202d3150/usr/bin/python3 tools/check_conventions.py --base 929e8d8442bb23635f7a55ff3e1232cdcd52c379 --head 12db53231df734606b7e964d04da7842202d3150 --title feat(libSceNKWebKit): store the measured fields --body /dev/shm/reviewer-run/precheck/14391/pr-body.md/usr/bin/python3 tools/pr_abi_audit.py --base 929e8d8442bb23635f7a55ff3e1232cdcd52c379 --head 12db53231df734606b7e964d04da7842202d3150 --jsonNo changed Python implementation files.No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.No changed test_*.py files./usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14391 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14391/stackNot run: C++ tests need exact-head binaries, which require a build; the precheck does not build./usr/bin/python3 /dev/shm/reviewer-run/precheck/14391/head-12db53231df7-fe5d39fd/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14391/head-12db53231df7-fe5d39fd --json core/libs/prx/libSceNKWebKit/Export.cpp core/libs/prx/libSceNKWebKit/include/FieldSettersExports.hpp core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp core/libs/prx/libSceNKWebKit/src/FieldSetters.cpp core/libs/prx/libSceNKWebKit/tests/FieldSetters.cpp docs/dev/debt/libSceNKWebKit.mdNo changed Python test module in tools/ can be run as a no-build base-source control.Negative control
Not run here. The C++ test needs a build.
Findings
Blocking: none.
Non-blocking:
selfin any of the 55 setters (for example_ZN3JSC14ProtoCallFrame12setCodeBlockEPNS_9CodeBlockEwrites atself + 0). A nullselffaults in host space. Other libraries in this repository check arguments before writing guest memory (for example theGuestCopyOut_nid_no_patchuses inlibSceMbusandlibSceBeisobmf), so the setters should throw on null or use that helper. This is the change I would ask for before merge.Sources
github.com/boykopovar/AnyPS5@12db53231d/core/libs/prx/libSceNKWebKit/src/FieldSetters.cppgithub.com/boykopovar/AnyPS5@12db53231d/core/libs/prx/libSceNKWebKit/tests/FieldSetters.cppNot verified
guest_nkwebkit_field_setterswas not built or run here.conventions,eligibility,labels,library-portabilityandreportsucceeded;windowswas in progress;linux,register-context,relinker,relinker-asanandwrite-watchwere skipped.