fix(agc): order a guest store against a guarded publication on Linux #26069
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/26069"
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 relativespace2K on 2026-11-23T07:11:13Z.
What
WriteChangedIfHeldchecks the tracker generation and then CASes each word into guest memory. A guest store of the same value that lands between that check and the CAS is not seen: the CAS succeeds, the GPU bytes overwrite the store, and the second walk stamps the page as the driver's. The issue asks for ordering rather than a later check.On Linux this change orders the store:
WriteChangedIfHeldnow writes its result through the shared backing alias (GuestArenaWriteSharedBacking, the same pathcopyOwnBytesalready uses off Windows) and makes the part's pages read-only for the commit.CrashReportand theGuestWriteWatchHandleFaulthook; there is no secondSIGSEGVhandler.BeginPublicationrecords the current VMA protections (PROCMAP_QUERY, with/proc/self/mapsas the fallback) and restores them exactly atEndPublication. Pages that were read-only or executable keep those bits; pages that were write-armed are re-armed with UFFD write protection, while pages that were fresh stay writable. Only writable VMAs are made read-only.BeginPublicationprepares the run list and the opened-page list before activating the guard. The publication state transitions (BeginPublication,EndPublication,RecoverPublication) are serialized with a spin lock. If setup fails after activation, every opened page is restored; when all restores succeed the run count, active flag and recovery flag are cleared, and when a restore fails the guard and run list stay in place with recovery set so the next fault or publication finishes the restore. The run list lives in a fixed array, so the fault handler never takes ashared_ptrreference and never frees it in a signal handler. If a page cannot be restored atEndPublication, the guard stays active and the next guest write or publication completes the restore, verifies every guarded page is writable, and only then clears it. The wait in the handler is bounded at two seconds.EndPublicationisnoexcept.EndPublicationcleared it is retried only when the address falls in one of the last eight publication ranges and its page is writable; a fault in a newer publication's range waits for that publication, and a writable page that was never guarded returns false.CheckFaultAfterAnotherPublicationcovers a stale fault from publication A after publication B starts on another page, and a third watched page outside both publications.SetWriteChangedIfHeldHookForTestandCheckWriteChangedIfHeldSameValueinagc_write_trackingstore the same byte back through a hook between the check and the CAS. The test is red without the change and green with it.CheckPublicationKeepsPageProtectioninagc_write_trackingstarts a publication over a watched block with a read-only page and an RWX page, then checks that the read-only page is still read-only, the RWX page is still executable, and a later guest store is still collected.Windows private guest memory has no alias for a host write to a read-only page (
WriteProcessMemoryfails with 998,NtWriteVirtualMemorywithSTATUS_ACCESS_DENIED). The regression is skipped there with a printed reason and the gap is recorded indocs/dev/debt/changes/agc-same-value-publication-windows.md; the issue stays open for Windows.The change previously shared
GuestWriteWatch.cppwith #19054; that PR merged first, and this branch is merged withmaina2d8d409dba.ReadTraps::faultinstalls its own SIGSEGV handler and chains unhandled faults toCrashReport'sOnFatalSignal. A publication page isPROT_READ, not a read-trappedPROT_NONEpage, soretryOpenreturns false and the write fault reaches the publication gate; the same-value ordering is unchanged.GuestMemory.cpp/WriteTracking.cppare still shared with #20041, #22062, #22306, #12792 and #24008.Tested
Linux, Ubuntu 24.04, kernel 7.2.15, Intel i5-8250U (8 threads), GCC 13.3.0, Release,
-j 2, build-15600-linux, on369888e18a5:ctest -R '^agc_write_tracking': 5/5 passed (agc_write_tracking,agc_write_tracking_generation_wrap,agc_write_tracking_mark_order,agc_write_tracking_import_over_read_traps,agc_write_tracking_import_keeps_read_traps).8c970fb17ecwithout the fix in the pre-rebase tree:agc_write_trackingfails witha guarded publication overwrote a same-value guest store made during its commit.PROT_READand one pagePROT_READ | PROT_WRITE | PROT_EXEC, publishes, and checks both stay as they were; a later store on the writable page is still reported by the write watch.Windows 11, Ryzen 5 5600, WinLibs GCC 15.2.0, Release, on
369888e18a5:agc_write_tracking: passed; the new case printssame-value publication regression skipped: ...and points at the debt entry.patched_libraries: 413 loaded, 0 failed. The publication helpers are exported as_nid_no_patch; without the suffix the NID patcher renamed them andlibSceAgcDriverfailed to load with error 127.ctest -R '^(patched_libraries|agc_write_tracking)': 12/12 passed.WriteChangedIfHelddirectly.hamdanpor-ctrl compared
mainand this PR on an NVIDIA RTX 3050 Laptop (driver 617.42, Windows 11 26300) with the validation layer: 2,095 passed on the PR against 2,096 onmain, the sameagc_driver_store_over_untrackedfailure (#22670), 0VUID-lines and the same validation messages. The 11agc_write_tracking*tests pass.agc_drivertimed out once in the parallel run with the PR and passed 3/3 alone (98.5 s, 27.1 s, 47.0 s); the same test varies onmain(#22565). The run usedf249fb4cfe;333f581140aonly renames the two publication helpers.python tools/check_conventions.py --base origin/main: all checks passed.python tools/pr_overlap.py --branch fix/15600-same-value-publication: fails closed on older PRs that conflict withmain; the readable report lists the shared files above and no open PR with the same ordering fix.Perf
No PPSA21564 run is available on this machine. On Linux the guard is limited to guarded publications (
unchangedSince != 0) with at least one changed byte; parts whose bytes are unchanged return beforeBeginPublication. Within a guarded part, only writable VMAs are made read-only, and the exact protections are restored. If a PPSA21564 perf window is needed before merge, I need the test setup or a run from someone with that title.agc_write_tracking_tests --publication-benchon the same i5-8250U, 64 KiB parts:BeginPublication+EndPublication: about 16-18 µs.This is CPU-only, not a PPSA21564 frame measurement.
Checklist
main; no other open PR implements the same functions (shared files with #19054, #20041, #22062, #22306, #12792 and #24008 are noted above)NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (the debt entry is indocs/dev/debt/changes/)Summary by CodeRabbit
Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T07:38:21Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: publication currently overwrites the write watch’s tracked page protection and can leave guarded pages writable afterward.
What I ran
Reviewed head
6e0a4bdf6d4f4ac946180e6c3880218b8a8ecfd3usingrepo_read.py. I read the prepared description, commits, manifest, diff, and all six changed files listed as reviewed. No commands or tests were run; results reported in the description are author-reported.Results
Findings
Blocking
core/libs/prx/libc/src/GuestWriteWatch.cpp:82applies rawmprotect(PROT_READ)to watched pages, bypassing the write watch’s per-page protection state.EndPublicationthen unconditionally restoresPROT_READ | PROT_WRITEat line 93. The watch’s page state may still say the page is write protected (or read trapped), so a later collect or read-trap operation can incorrectly assume its protection is active while the actual mapping is writable. That can suppress write detection and allow guest writes to bypass read trapping. Preserve and restore each page’s tracked protection through the watch’s protection machinery, or otherwise synchronize the publication transition with that state.Non-blocking
None.
Not verified
files.jsonwas not available from the reader.To get this to a good state
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T08:06:58Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: ensure publication cleanup runs if setup throws after activating the guard.
What I ran
Reviewed head
131fe67bbe47288309ee2e4b689c774f6582cf4dfrom the prepared diff and pinned reader. No build or tests were run.Results
Findings
Blocking
BeginPublicationsets_publicationtrue and publishes its run data before constructing and reserving theopenedvector. Ifmake_sharedorreservethrows,WriteChangedIfHeldnever sets its localpublicationflag, so its destructor cannot callEndPublication. The global guard then remains active and subsequent callers spin indefinitely; writable pages may also remain read-only. Make the setup exception-safe by preparing allocations before activating the guard, or by clearing/restoring state on every exception. (core/libs/prx/libc/src/GuestWriteWatch.cpp:325andcore/libs/prx/libc/src/GuestWriteWatch.cpp:330.)Non-blocking
None.
Not verified
Builds, tests, runtime behavior, and other changed behavior were not independently verified. The review artifacts indicate all seven changed files were included; I read the description, commits, manifest, diff, and changed code in
GuestMemory.hpp,GuestMemory.cpp,WriteTracking.cpp,GuestWriteWatch.hpp,GuestWriteWatch.cpp,CrashReport.cpp, and the Windows debt note. No files were excluded according to the manifest.To get this to a good state
Make
BeginPublicationexception-safe so allocation failures cannot leave the publication active or pages protected. Then rerun the relevant write-tracking tests.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T08:11:55Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: make the publication guard restore the original page protections and write-watch state on every exit, including when ending the guard fails.
What I ran
Reviewed head
d6ed893f58a2f189d735999b75231fd51849da6aagainst the prepared diff and targeted source context. Read all changed files listed as included inmanifest.json; the tests and checks described in the PR body are author-reported, not run in this review. No repository commands were run.Results
Findings
Blocking
core/libs/prx/libc/src/GuestWriteWatch.cpp:145:EndPublicationignoresmprotectfailure while restoring writable VMAs, then continues to clear the guard at lines 184–185. If restoration fails, the affected guest pages remain read-only after publication and subsequent writes fault without an active guard to handle them. The RAII cleanup inWriteChangedIfHeldcannot report or recover from this becauseEndPublicationisnoexcept. Handle restoration failure so the guard cannot be cleared while pages remain protected, or provide a recovery path that restores the original permissions before returning.Non-blocking
Sources
core/libs/prx/libc/src/GuestWriteWatch.cpp:145andcore/libs/prx/libc/src/GuestWriteWatch.cpp:184.core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp:4181.Not verified
core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp,core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp,core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp,core/libs/prx/libc/include/GuestWriteWatch.hpp,core/libs/prx/libc/src/GuestWriteWatch.cpp,core/libs/prx/libc/src/specifics/linux/CrashReport.cpp, anddocs/dev/debt/changes/agc-same-value-publication-windows.md.files.jsonwas not present in the prepared materials;manifest.jsonmarks each of these changed files included.To get this to a good state
Ensure the publication cleanup handles failures restoring page protections before clearing the guard, then rerun the Linux write-tracking tests on the updated head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T08:18:31Z.
Review: COMMENTED
Reviewed — no blocking findings
The changed code read supports the Linux publication ordering described; no blocking defect was verified, but checks were not run in this review.
What I ran
Pinned head:
2a18baf41df21291ed2ace6c067453d51861285e. Read the prepared description, commits, manifest, and diff, then inspected changed code at the pinned head withrepo_read.py. No commands or tests were run.Results
Findings
Blocking
None verified in the changed code read.
Non-blocking
None.
Not verified
No tests, build, or negative control were run in this review. The author-reported Linux and Windows test results were not independently verified. Read changed files:
GuestMemory.hpp,GuestMemory.cpp,WriteTracking.cpp,GuestWriteWatch.hpp,GuestWriteWatch.cpp,CrashReport.cpp, andagc-same-value-publication-windows.md. The prepared manifest marks all seven changed files as included;files.jsonwas not available through the reader, so any exclusions beyond those listed in the manifest were not verified.To get this to a good state
Nothing is required. Optional: run the reported Linux and Windows checks on this head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T08:22:34Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: fix publication recovery so an unrelated write fault cannot clear the guard while writable pages remain read-only.
What I ran
Reviewed head
0a18d11795cddc4e8a6891c165c605236342a8ab; no commands or tests were run. Read all seven changed files listed as reviewed in the manifest, plus targeted context fromHostMapping.hppandGuestMemory.cpp. The review bundle did not includefiles.json;list_filesshowed all seven changed files included. The diff, descriptions, and commit list came from the prepared review bundle.Results
Findings
Blocking
GuestWriteWatch.cpp:165, a fault anywhere in the active publication range entersRecoverPublication()whenever the recovery flag is set. That function restores the publication’s writable runs and then clears both guard flags (GuestWriteWatch.cpp:585-589). If restoration previously failed on a run,restorePublicationRuns()returns at its first failed run (GuestWriteWatch.cpp:532-538), leaving that and any later runs protected. A subsequent unrelated fault within the guarded range can then successfully recover only part of the runs, clear the guard, and return to retry the faulting instruction (GuestWriteWatch.cpp:165). The publication thread may still be committing through the alias, so a guest store on one of the still-read-only pages can fault again after the guard is gone and become fatal. Keep recovery active until every writable run is restored, and only resume the faulting store once its page is writable. Changed lines:core/libs/prx/libc/src/GuestWriteWatch.cpp:165.Non-blocking
None.
Not verified
To get this to a good state
Make recovery prove that all protected writable runs are writable before it clears the guard or resumes a faulting guest store. Then rerun the write-tracking tests on the new head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T08:39:31Z.
Review: COMMENTED
Reviewed — comments
Changes add a Linux publication guard and regression coverage; I found one correctness concern in the guard's fault handler, and no checks were run during this review.
What I ran
f249fb4cfed33d95efb7fefefb51936f854adbc0; no merged-preview check was run.description.md,commits.md,manifest.json,diff.patch, and all seven changed files listed in the manifest. The manifest marks every changed file as included. Targeted repository context was read fromGuestWriteWatch.cpp.Results
Findings
Blocking
None.
Non-blocking
HandleFaultchecks the address against_publicationBegin/_publicationEndbefore checking whether a publication is active. Those bounds are retained after the publication ends, so an unrelated write fault in the same address range can spin for up to two seconds and be treated as handled if the page is writable. Consider checking the active or recovery state before entering the wait loop, while preserving the race handling around publication end. Evidence:core/libs/prx/libc/src/GuestWriteWatch.cpp:164.Not verified
To get this to a good state
Nothing is required. The fault-handler observation is optional feedback.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-24T23:47:21Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: ensure the publication guard is cleared or recovered if setup fails after activation, and do not allow concurrent recovery to interfere with a new publication.
What I ran
Reviewed head
33706cad5dd89ea376f139143969b15d29661e52from the prepared diff and source context using the PR reader. No build or tests were run. No merged-preview check was run.Results
Findings
Blocking
GuestWriteWatch.cpp:147— If an exception occurs after_publicationbecomes true, this catch restores the already-opened VMAs and clears the run count and active flag, but does not clear_publicationRecovery. That flag can be left over from a concurrentEndPublicationwhich failed to restore pages after observing this in-progress publication. SubsequentBeginPublicationcalls loop on recovery;RecoverPublication()sees a zero run count, clears both flags, and may race with anotherBeginPublicationthat has already activated its guard. Serialize recovery and publication state transitions, or ensure this failure path restores the invariant without leaving a stale recovery flag.Non-blocking
None.
Not verified
No build, tests, or runtime checks were performed. The review bundle listed seven changed files, all included:
GuestMemory.hpp,GuestMemory.cpp,WriteTracking.cpp,GuestWriteWatch.hpp,GuestWriteWatch.cpp, LinuxCrashReport.cpp, and the Windows debt note. I read the description, commits, manifest, diff, and targeted ranges in the changed source files, plus the LinuxHostMapping.hppcontext. I did not read every line of the changed files.To get this to a good state
Serialize publication recovery and activation so a stale recovery flag cannot clear a newly active publication. Rerun the Linux write tracking tests and relevant build on the revised head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T02:12:33Z.
Review: COMMENTED
Reviewed — comments
The review covers all seven changed files at head
7b99c9f9dd9ef9d9100d4ca28fc51f525f854d74; Linux guarded publication logic has one unverified protection edge case, and no checks were run by me.What I ran
Read the prepared description, commits, manifest, diff, and all seven changed files at the pinned head. Inspected the
storeOwncaller path, Linux signal handling, and HostMapping implementation. No build or test commands were run; the test results in the description are author-reported.Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libc/src/GuestWriteWatch.cpp:549treats a page as fresh based on_fresh, andarmPublicationRunsskips re-arming fresh pages.BeginPublicationonly checks that the range is covered before changing VMA protections; it does not verify that a page is still write-watch armed. Ifmprotectchanges a watched page to writable after it has become fresh, a store after publication can occur without a userfaultfd write-protect fault, and the page remains classified as fresh so the next publication skips arming it again. Consider validating that writable pages are armed before publication or reconciling the fresh/write-watch state after external protection changes. This edge case is not established by the added tests.Not verified
To get this to a good state
Nothing is required. Optional: cover externally changed protections on fresh watched pages in a regression test and ensure subsequent guest writes remain collected.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T08:43:06Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the reviewed Linux ordering path and its tests support merging, with the Windows limitation documented.
What I ran
Reviewed head
08d81159f2c677abae2af0c205db36e6e5bedb7e. Read the prepared description, commits, manifest, diff, and all included changed files. Read relevant code inGuestArena.cpp. Usedrepo_read.pyto inspect source; no tests or build commands were run. No merged preview was run.Results
Findings
Blocking
None.
Non-blocking
Not verified
No tests or builds were run. Author-reported runs, hardware measurements, and Windows behavior were not independently confirmed.
files.jsonwas not available through the reader; the manifest lists seven changed files, all marked included. Read the full changedGuestMemory.hpp,GuestMemory.cpp,WriteTracking.cpp,GuestWriteWatch.hpp,GuestWriteWatch.cpp,CrashReport.cpp, and the Windows debt note, plus targeted context inGuestArena.cpp.To get this to a good state
Nothing is required. The optional point above is informational.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T09:01:14Z.
Review: DISMISSED
Reviewed — changes requested
Changes are required before merge: limit stale-fault retries to addresses covered by a publication.
What I ran
Reviewed head
bfe66e76bca63061c135a98755365ce9f01dc161using the prepared diff and pinned repository reader. No build or test commands were run; the checks described in the PR are author-reported.Results
Negative control
Not run during this review. The PR description reports that the regression test fails on a pre-fix commit.
Findings
Blocking
core/libs/prx/libc/src/GuestWriteWatch.cpp:481: For write faults outside the recorded publication range,HandleFaultreturns whether the address is currently writable. The Linux fatal-signal handler calls this for writeSIGSEGVs generally, so an unrelated write fault at a writable address is claimed and retried; if the underlying fault persists, the process repeatedly faults instead of reaching normal crash handling. Returnfalsefor addresses outside a publication, and only retry a stale fault when it falls within a guarded range that has since become writable. Pinned source Signal-handler callerNon-blocking
None.
Sources
The prepared diff and manifest, plus the changed files in the pinned repository:
GuestMemory.hpp,GuestMemory.cpp,WriteTracking.cpp,GuestWriteWatch.hpp,GuestWriteWatch.cpp,CrashReport.cpp,Exception.cpp, andagc-same-value-publication-windows.md.Not verified
Builds, tests, negative control, GPU behavior, and performance measurements were not run in this review. The PR description reports those checks and results; they remain author-reported.
To get this to a good state
Restrict the retry path to faults within a publication range, add coverage for an unrelated write fault on a writable mapping, then rerun the relevant Linux write-tracking checks.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T09:15:43Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the Linux publication ordering fix is supported by the code reviewed, with Windows behavior explicitly deferred.
What I ran
Reviewed head
c7dddd3e308cbdb725f4715127791160036a4e7c. No commands or tests were run in this review; test results below are reported by the author. I read the prepared description, commits, diff, and all eight changed files listed in the manifest. All eight were included in the review bundle;files.jsonwas not available through the reader, so excluded files are not verified.Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp:4177). Keep the issue open until Windows has an ordering mechanism.Not verified
files.jsonwas not readable through the provided reader, so excluded files are not verified.To get this to a good state
Nothing is required. Optional: track the documented Windows follow-up to completion.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-28T00:06:04Z.
Review: COMMENTED
Actionable comments posted: 14
1d38e026-e87e-4a38-8aa4-0cd07ab1b0c4Reviewing files that changed from the base of the PR and between
a2d8d409dband7cbfe2b40f.core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hppcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/tests/WriteTracking.cppcore/libs/prx/libc/include/GuestWriteWatch.hppcore/libs/prx/libc/src/GuestWriteWatch.cppcore/libs/prx/libc/src/specifics/linux/CrashReport.cppcore/libs/prx/libkernel/System/src/Exception.cppdocs/dev/debt/changes/agc-same-value-publication-windows.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-28T00:51:45Z.
Review: COMMENTED
Actionable comments posted: 3
9302db08-cee1-4524-9a69-8523216bef1bReviewing files that changed from the base of the PR and between
7cbfe2b40fand369888e18a.core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/tests/WriteTracking.cppcore/libs/prx/libc/src/GuestWriteWatch.cppcore/libs/prx/libkernel/System/src/Exception.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T06:26:29Z.
Review: COMMENTED
Reviewed — no blocking findings
The Linux publication guard and write-fault recovery changes appear sound based on the changed code inspected; I did not run checks in this review.
What I ran
369888e18a502e432240f07c53d004b6cab2a538usingrepo_read.pyreview-folder and pinned-head reader tools.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
GuestMemory.cpp,GuestWriteWatch.cpp, and LinuxCrashReport.cpp; I did not read the added lines inGuestMemory.hpp,WriteTracking.cpp,GuestWriteWatch.hpp,Exception.cpp, or the Windows debt document. Therefore this is not a complete verification of all changed lines.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-03T12:27:54Z.
Review: COMMENTED
Actionable comments
errnoacross publication fault handling.77c7ad91-95ba-4ddc-90e1-c61405d05a52Reviewing files that changed from the base of the PR and between
369888e18aand5f22b43902.core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hppcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/tests/WriteTracking.cppcore/libs/prx/libc/include/GuestWriteWatch.hppcore/libs/prx/libc/src/GuestWriteWatch.cppcore/libs/prx/libc/src/specifics/linux/CrashReport.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T12:33:13Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
5f22b4390225f59c1d2aaf860fb8413b2ef3c5e7using the prepared diff and targeted source excerpts. No build or test was run; the environment and toolchain were not assessed.Results
Negative control
Could not run; the PR description reports a failing pre-fix regression, but I did not verify it.
Findings
Blocking
None.
Non-blocking
None.
Sources
Behavior reviewed in GuestMemory.cpp, GuestWriteWatch.cpp, CrashReport.cpp, and Exception.cpp.
Not verified
Targeted changed hunks and related functions were read in all eight files listed under
reviewedinfiles.json; none were excluded. Build and test claims, host hardware behavior, and unchanged callers outside the inspected ranges were not independently verified.To get this to a good state
No changes are required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T21:31:28Z.
Review: COMMENTED
Please apply the fault-handler deadline to the publication-run snapshot loop as well.
HandleFaultchecks its deadline in the outer loop, while a snapshot whose generation is odd keeps retrying inside the inner loop without reaching that check. The recovery and ordinary wait already have explicit deadlines. The tests for restoring different VMA permissions and handling a fault from a completed publication are useful coverage. This is a defensive source finding. I have not run the Linux write-tracking cases on this head.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-04T02:14:47Z.
Review: COMMENTED
Actionable comments
5e65fae4-d37f-4084-96ed-4b1232a2a7bbReviewing files that changed from the base of the PR and between
5f22b43902and5e304b0fe5.core/libs/prx/libc/src/GuestWriteWatch.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-04T02:37:10Z.
Review: COMMENTED
Actionable comments
9685a97b-119b-4572-bd8a-c11780802f04Reviewing files that changed from the base of the PR and between
5e304b0fe5and1121cc4a34.core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libc/src/GuestWriteWatch.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-04T03:35:27Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; no findings require follow-up.
What I ran
Reviewed head
1121cc4a345ca376fd0f9e66623158e35c069a8dusingrepo_read.pyand the prepared diff. I did not run tests or compile anything.Results
Negative control
Not run by me. The author reports the regression test failed on the pre-fix tree and passed with this change.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
Runtime behavior and the reported test results were not independently verified. I inspected all 8 files listed under
reviewedinfiles.json; that file lists no exclusions.To get this to a good state
Nothing required.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.