fix(libSceHttp2): copy response metadata through guest memory #25731
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/25731"
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 malekaifa on 2026-11-22T15:55:05Z.
What
Route the remaining response-metadata output pairs in the HTTP/2 transport through guest-safe writes:
sceHttp2GetResponseContentLength(kind,content_length)sceHttp2GetAllResponseHeaders(header,header_size)sceHttp2GetAllTrailingHeaders(header,header_size)The transport preserves the existing request/network/readiness/null ordering, preflights both non-null output objects as writable before publishing either value, and then stores them through
Http2Guest::Store. An inaccessible guest output now returns the existing HTTP/2 null-pointer error0x817B1225instead of faulting the host, without partially changing the other output.This is the sibling follow-up identified during review of #25663; it intentionally changes
Transport.cppandGuestHttp2Transport.cpp, so it does not overlap that PR'sExport.cpp/ guest-pointer test files.Tested
Windows 11, UCRT MinGW GCC 16.2, Release,
BUILD_TESTING=ON:cmake --build C:/b/http2-metadata-guest-output-20261122 --target guest_http2_transport_tests --parallel 4— passedctest --test-dir C:/b/http2-metadata-guest-output-20261122 -R '^guest_http2_transport$' --output-on-failure— 1/1 passedcore/libs/prx/libSceHttp2/Transport.cppto upstream while retaining the new assertions;guest_http2_transportcrashed with access violation0xc0000005, writing address0x10; restoring the fix and rebuilding returned to 1/1 passingmain(23b87724628c54f0f5ba28619d02856f3f762c25), rebuilt the target and reran the focused CTest — 1/1 passedgit diff --check HEAD^ HEAD— cleanpython -I tools/check_conventions.py --base HEAD^ --head HEAD— passedChecklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-22T15:55:13Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-22T15:58:47Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
52043d2aaf:tools/check_conventions.pypassed.guest_http2_transport_testsbuilt cleanly.guest_http2_gzip_members,guest_http2_gzip_headers,guest_http2_transport,guest_http2_early_response,guest_http2_system_roots,guest_http2_http1_gzip,guest_http2_http1,guest_http2_http1_cookies,guest_http2_strip_gzip_headers,guest_http2_gzip_content_length,guest_http2_gzip_default,guest_http2_ssl_callbacks,guest_http2_redirects,guest_http2_auth_status):core/libs/prx/libSceHttp2/Transport.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-22T16:20:45Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the checks reported by the author support the guest-safe output handling, and I found no verified blocking defect in the changed code.
What I ran
Reviewed head
52043d2aaf12baf24347ddc4de44467ac31bb3b3against the prepared diff. No commands or tests were run.Read
core/libs/prx/libSceHttp2/Transport.cpp,core/libs/tests/GuestHttp2Transport.cpp, and the relatedGuestAccess.hpp,General.cpp, andExport.cppranges. Both changed files listed as reviewed in the manifest were read. No changed files were excluded.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I did not run the build, focused CTest, negative control, diff check, or conventions check. The reported Windows 11 build and test results were not independently confirmed. I reviewed only the changed files and the related ranges listed above; no other repository files were reviewed.
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by throny on 2026-11-22T17:13:53Z.
Review: APPROVED
Review: ✅ correct, I'd merge it
Basis: code read
Checked
Transport.cppwrite*kind,*length,*headerand*sizethrough raw guest pointers, so an unmapped pointer faults the host.Http2Guest::Store, and also checks the store results. Failure returns0x817B1225, theERROR_NULL_POINTERtheExport.cppgetters use. Null still throws viaRequire, and values and ordering for valid inputs are unchanged.0x10for each output, check the other output is untouched, and fault on main.Findings
none.
Request::Status(Transport.cpp:1315-1321,sceHttp2GetStatusCode) still writes*statusraw. Check that #25663 covers it.Suggested action: merge
AI-assisted review (Claude Code) · head
52043d2aaf· basemain23b8772462Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-24T23:12:58Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
a845b7de185e586b6b597750c6fda92e224a2eb9. I readdescription.md,commits.md,manifest.json,diff.patch, the changedTransport.cppandGuestHttp2Transport.cppranges,GuestAccess.hpp, and searched the HTTP/2 exports and guest-write call sites. No commands or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The repository reader did not expose the prepared
review/files/snapshots orfiles.json; I reviewed the changed code at the pinned head through the reader. I did not verify host build/test results, negative-control behavior, the full test file, or excluded files fromfiles.json.To get this to a good state
Nothing is required.