fix(libSceMoveTracker): guard guest write check with GuestArena::HostWrite #27997
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/27997"
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-28T02:10:57Z.
What
Guard guest write checks in
libSceMoveTrackerwithGuestArena::HostWriteso invalid or unmapped guest pointers fail cleanly instead of crashing the host.Tested
guest_move_trackerandguest_move_tracker_not_initialized(2/2 passed)Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch).mdfiles or images added to the repositorySummary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-11-28T05:39:01Z.
Review: APPROVED
Checked head
24b091d351. All on Windows 11 with WinLibs GCC 15.2 (Release), applied tomain4c7578e0a4together with #27996, #27978, #27975, #27973, #27971, #27969, #27967, #27964, #27958, #27950, #27949, #27946, #27945, #27943, #27938, #27936.tools/check_conventions.py --headandtools/debt_fold.py --checkpassed and the full build succeeded.guest_move_trackerandguest_move_tracker_not_initializedpass. This is the platform where the change matters: on WindowsGuestWritable_nid_no_patchreads the page protection, so a write-watched guest page (PAGE_READONLY) reads as unwritable unlessHostWriteis open. The guard closes whenIsValidGuestWritereturns, which is fine here because its only caller,sceMoveTrackerInit, writes nothing beforeNotImplemented. None of the existing tests putsworkMemoryunder a write watch, so the guarded path itself is not exercised. In the full CPU suite (5,131 tests) the only failures are unrelated:windows_read_trap_unknownfails onmaintoo (fixed in #28028), andframe_capture_minimizeis a timeout under load that passes on its own.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T10:51:48Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the implementation guards guest write validation with
HostWriteand preserves the existing one-byte check for zero-length requests.What I ran
Reviewed head
24b091d35104646b01611f38a6ec1981f524141e. No commands or tests were run; source was inspected throughrepo_read.py. No merged-preview check was performed.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No runtime tests were run, and behavior on Windows, macOS, or a physical console was not verified. Read:
core/libs/prx/libSceMoveTracker/Export.cpp,core/libs/prx/libc/include/GuestArena.hpp, and the relevantGuestWritable_nid_no_patchimplementation incore/libs/prx/libc/src/General.cpp. The preparedmanifest.jsonshows one changed file and marks its full text included; the file was read from the pinned repository head. No files were listed as excluded in the available review bundle.To get this to a good state
Nothing is required.