fix(libSceAgcDriver): validate PM4 write and copy data register destination bounds #14130
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14130"
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 slopgobblercobbler on 2026-10-31T19:57:50Z.
What
In PM4 packet handling for
IT_WRITE_DATA(opcode 0x37) andIT_COPY_DATA(opcode 0x40):DecodeLabelWrite,ResolveStore, andDecodeStoresto reject reserved, invalid, or non-memory destinations from decoding as memory writes.core/libs/prx/libSceAgcDriver/tests/Pm4.cpp.Tested
Host Clang 20 syntax compilation checks on modified driver execution and test sources. Verified
python tools/check_conventions.pyreports 0 findings.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T20:20:12Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
I found no source defect, but the required paired AGC validation evidence and VUID comparison are missing.
What I ran
Reviewed head
7ad84ad6d33dd4ab97937d6990731ea8f16a5cb8against base500d37a747c2b958e8696aa16213a0ee78d47505. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build or compile during this initial review.Results
tests/Pm4.cppis included in the test target and in the CTest registration loopRaw output from local checks
Findings
Blocking: The PR changes the AGC driver, but the PR description reports only host syntax compilation and does not include the repository-required paired focused test runs on
mainand this head withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1, andANYPS5_REQUIRE_VULKAN=1, or a comparison showing no new VUIDs. Hosted Linux and specialized jobs were skipped, so they do not provide that evidence. Please attach both runs from the same machine and GPU, confirm the validation layer loaded in each log, and include the VUID comparison.Non-blocking: I found no source-level defect. The test-registration heuristic warning is a false positive;
tests/Pm4.cppis registered in the CMake test target.Sources
tests/Pm4.cpp, included in the registered AGC CTest target listNot verified
No local build, CTest, Vulkan validation run, or GPU comparison was performed. The PR description's Clang syntax check was not independently reproduced.
To get this to a good state
Provide the paired validation-layer logs and VUID comparison requested above. I will rerun the same relevant checks on the new head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T03:40:09Z.
Review: CHANGES_REQUESTED
Re-checked — new head, changes requested
The new head removes the questionable destination-4 throw assertion, but its required AGC validation evidence is still for an older base and head.
What I ran
Reviewed exact head
7101f798ac0cadbd2bd297dc77e2da21e5509532(PR basedc9dc7eaaeaf99b1c491d426e68bb999def3da16). The latest upstreammainI checked isca82d0c0228597bf063b15e24aaac3b3cd1ce9d5; the PR merges cleanly onto it in the local preview. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build or compile.Results
ca82d0c0228597bf063b15e24aaac3b3cd1ce9d5.7ad84ad6d33dd4ab97937d6990731ea8f16a5cb8againstmain8a00f9c1cab0a4609f518eba09181cf7d9e25cb1. It reports no new VUIDs, but it does not cover this rebased head/current base.expectFailureassertion was removed; the implementation source is unchanged from the tested head.Findings
Blocking: The paired run does not validate the current revision against the current base. Since that run,
mainadvanced and changedPm4.cpp; this PR was then rebased ontodc9dc7e, and the exact current head has no pairedmain/PR validation-layer run. The repository requires those focused runs on the same machine and GPU withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1, andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, plus confirmation that the requested layer loaded and no new VUIDs appeared. Please provide the pair against currentmainand this head.Non-blocking: I found no remaining issue with the removed destination-4 throw assertion.
Not verified
I did not run a build, CTest, or Vulkan/GPU test locally. The paired GPU results above are author-provided for the previous head/base, not independent results for this revision.
To get this to a good state
Attach the paired current-main/current-head focused logs and VUID comparison, confirming the validation layer loaded in both runs; I will re-check the same evidence on the exact new head.