fix(libSceNKWebKitRequirements): guard psl_load_fp stream check with HostWrite #28267
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/28267"
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 NobleBrains on 2026-11-29T14:49:43Z.
What
core/libs/prx/libSceNKWebKitRequirements/Psl.cpp(psl_load_fp_nid_postfix) checked the guest stream viaGuestWritable_nid_no_patchwithout an enclosingGuestArena::HostWriteguard.GuestArena::HostWritebefore the writability check and keep it while the stream is read and synced; return null whenguard.Open()or the check fails.errnoacross the check.core/libs/prx/libSceNKWebKitRequirements/tests/Psl.cppwithHostWritehook tests for an unmapped and a valid stream anderrnopreservation.Tested
Linux (Distrobox build):
ctest -R '^guest_nk_req_psl$'passed (1/1);python3 tools/check_conventions.pypassed;python3 tools/pr_overlap.py --branchreported no overlap with open pull requests. Windows: not tested.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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-29T14:50:32Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
53c4a2f520:tools/check_conventions.pypassed.guest_nk_req_psl_testsbuilt cleanly.guest_nk_req_psl):core/libs/prx/libSceNKWebKitRequirements/Psl.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-29T15:09:58Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
53c4a2f520aec0420a162b3c502d422d51d6f592usingrepo_read.pyto inspect the prepared diff and changed files, plus the relevantGuestArenaandGuestWritableimplementations. I did not run tests or other commands.Results
Findings
Blocking
None.
Non-blocking
None.
Sources
Psl.cppat the reviewed headtests/Psl.cppat the reviewed headGuestArena::HostWriteandGuestWritable_nid_no_patchimplementations were also read.Not verified
Tests were not run independently. The Linux
ctestand convention-check results in the PR description are author-reported; Windows behavior was not tested. Both files listed underreviewedinmanifest.jsonwere read; no changed files were excluded.To get this to a good state
Nothing is required. The PR description's test results are optional context and were not independently verified.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T06:49:41Z.
Review: APPROVED
Reviewed — looks good
The reviewed change at
045652dcd2c5d4909d470bb29c10cd8c0f8d8ac5holdsHostWriteacross stream validation, loading, and synchronization, and I found no defect in the changed code.What I ran
Reviewed the prepared diff and both changed files in full. Used
repo_read.pyat the pinned head to inspectHostWrite,GuestWritable_nid_no_patch, andGetNativeStreambehavior. No tests or builds were run.Results
Negative control
Not run; no tests were executed during this review.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
No tests or builds were run, and Windows behavior was not verified. Both changed files listed under
reviewedwere read in full;files.jsonlists no excluded files.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T08:10:38Z.
Review: COMMENTED
I compiled the changed stream wrapper and its fixture against the project's pinned libpsl and Linux guest libraries. The test passed with the hook that changes
errnoon entry, preserving the caller's value for both the successfully parsed stream and the rejected stream. The accepted stream reached EOF and the fixture's four guest-path cases and nine source-selection cases also passed. This run exercised Linux.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-12-03T15:51:45Z.
Review: APPROVED
I read the diff at
045652dcd2. Windows 11 with GCC 15.2 and Linux (Ubuntu 24.04 in WSL2, GCC 13.3), merged intomainatc1593e4e1ddtogether with other open PRs (so not an isolated build).guest_nk_req_psl: pass on both.main's): it fails with "unmapped psl_load_fp check should open HostWrite".Not checked: a page that the GPU write watch really protects: the test counts the write brackets.
AI-assisted: yes (Claude Code)