Repository navigation
fix(libSceAgc): validate and safely copy semaphore label pointer in sceAgcGetSemaphoreLabel - #22215
Conversation
|
Windows + NVIDIA result for head Host: Windows 11 26300, Intel i7-12700K, NVIDIA GeForce RTX 2070 SUPER, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, Validation-layer protocol on
The tests this PR adds or changes ( AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the reviewed code validates and safely copies the semaphore label output, and the test covers an unmapped destination.
What I ran
Reviewed head f8c18ae8a3946bebe84dcc9011d16be5ea9ed045. No commands or tests were run. Read description.md, commits.md, manifest.json, diff.patch, all three changed files, and the GuestWritable_nid_no_patch / GuestCopyOut_nid_no_patch implementations in General.cpp. All files listed in the manifest were read.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed files | passed | All three changed files reviewed |
| Relevant copy helpers | passed | Implementations inspected |
| Test execution | not run | Relied on code inspection |
| Hardware behavior | not run | Description says console behavior is unmeasured |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author reports that agc_semaphore_tests and check_conventions.py passed; I did not run them. Physical console behavior and the description’s hardware, sanitizer, and formatting checklist claims were not independently verified. files.json was not available as a readable review document; the review folder listing and manifest were used to identify the changed files. No files were excluded in manifest.json.
To get this to a good state
Nothing is required.
|
Rebased onto |
f8c18ae to
6772787
Compare
…ceAgcGetSemaphoreLabel
6772787 to
fdc1b8c
Compare
|
Updated and rebased onto |
numeric_limits<T>::max() in this file breaks under the windows.h max macro on MSVC.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this review; the points below are optional.
What I ran
- Reviewed head
4b3dd781fadf6eea04ab6443dd60938f81018fd3using the prepared diff and repository reader. - Read
core/libs/prx/libSceAgc/Misc/src/Semaphore.cpp,core/libs/prx/libSceAgc/tests/Semaphore.cpp, anddocs/dev/debt/changes/fix-libSceAgc-semaphore-label-copyout.md; also read targeted GuestArena and existing test context incore/libs/prx/libc/include/GuestArena.hpp,core/libs/prx/libc/src/General.cpp, andcore/libs/prx/libSceAgc/tests/StaticBuffer.cpp. - Did not run commands or tests. Build and test results in the PR description are author-reported.
Results
| Check | Result | Note |
|---|---|---|
| Diff review | passed | All three changed files read |
| Build and tests | not run | Reported by author only |
| Negative control | not run | No test mutation performed |
Findings
Blocking
None.
Non-blocking
None.
Not verified
- The reported Linux build, semaphore test, and convention/debt checks were not independently run.
- Windows and console hardware behavior were not exercised.
- All files marked reviewed in the manifest were read; no changed file was excluded.
To get this to a good state
Nothing is required.
What
GuestArena::HostWritearoundGuestWritable_nid_no_patchandGuestCopyOut_nid_no_patchinsceAgcGetSemaphoreLabel, restoring callererrnobeforeAgc::Command::Requirechecks so write-watched output pages succeed without leakingerrno.core/libs/prx/libSceAgc/tests/Semaphore.cppto use armedGuestArenawrite-watched destination pages (PAGE_READONLYassertion on Windows,GuestArenaCollectWrites/GuestWriteWatchCollectdirty-page verification) alongside unmapped and0x02read-only refusal checks witherrnopreservation.docs/dev/debt/changes/fix-libSceAgc-semaphore-label-copyout.md.Tested
/tmp/anyps5_verify_build, rebased ontoorigin/main(5f04682cef, PR headfdc1b8c5cd):ctest --test-dir /tmp/anyps5_verify_build --output-on-failure -R "^agc_semaphore_tests$": 1/1 Passed.python3 tools/debt_fold.py --checkandpython3 tools/check_conventions.py --base origin/main: Passed cleanly.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)