feat(libSceHttp2): create WebSocket requests and answer them as a PS5 does before they connect #11470

Merged
frankea merged 11 commits from upstream-pr/11470 into main 2026-11-06 19:27:17 +00:00
frankea commented 2026-10-26 15:34:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-26T15:34:54Z.


What

Onimusha (PPSA27836) imports sceHttp2WebSocketCreateRequest, sceHttp2WebSocketSetPingInterval, sceHttp2WebSocketSetPingTimeout, sceHttp2WebSocketSendTextMessageAsync, sceHttp2WebSocketSendDataMessageAsync and sceHttp2WebSocketCloseAsync, and all six threw. They now answer as a PS5 does for a WebSocket request that has not connected, the only state this offline library has:

  • sceHttp2WebSocketCreateRequest checks its arguments, zeroes the receive buffer, checks the template and the URL, and returns a request id from the same registry as sceHttp2CreateRequestWithURL, so sceHttp2DeleteRequest and template deletion handle it. Like that function on main, the request takes the template's SSL context, capacity, version and settings, with method GET and the URL. The URL goes through sceHttpUriParse, so libSceHttp2 now links libSceHttp; the scheme must be ws or wss.
  • sceHttp2WebSocketSetPingInterval and sceHttp2WebSocketSetPingTimeout check their values and drop them (listed under Silent stubs).
  • Text and data sends and sceHttp2WebSocketCloseAsync return 0x817B1065 (not connected) for a WebSocket request and 0x817B1100 for any other id. Before the id is looked up, a set option, a null text or data, and a close reason without a status return 0x817B11FE.
  • sceHttp2SendRequestAsync throws for every valid request on main (its "asynchronous requests" debt entry), WebSocket requests included. On the PS5 the handshake fails offline like any other request, but the library also calls the request's error callback with the request id, from its own thread (measured below); the WebSocket debt entry records that.

Measurement: PS5 on firmware 13.40, inside Gran Turismo 7 (PPSA01317), on 2026-10-26. A payload attached to the game with ptrace, created its own libnet pool, SSL context, Http2 context and template, called the game's libSceHttp2 exports, and deleted everything afterwards. Connections went to a closed port on a LAN host and to an unresolvable .invalid name.

sceHttp2WebSocketCreateRequest
  null text callback, null error callback, null buffer, size 0, option set  -> 0x817b11fe, buffer untouched
  unknown template                                                          -> 0x817b1100, buffer zeroed
  null URL                                                                  -> 0x80433060, buffer zeroed
  "http://host:9/probe", ""                                                 -> 0x817b1061
  "ws:/bad", "ws://host:9/probe", "wss://host:9/probe", "ws://x.invalid/"   -> request id (0x6000000n)
sceHttp2WebSocketSetPingInterval   0 -> 0; 999999 -> 0x817b11fe; 1000000, 0xffffffff -> 0
sceHttp2WebSocketSetPingTimeout    0, 999999 -> 0x817b11fe; 1000000, 0xffffffff -> 0
                                   both: id 0x7777 or a plain request -> 0x817b1100
sceHttp2WebSocketSendTextMessageAsync  before connecting -> 0x817b1065; option set -> 0x817b11fe; id 0x7777 or a plain request -> 0x817b1100
sceHttp2WebSocketSendDataMessageAsync  before connecting -> 0x817b1065
sceHttp2WebSocketCloseAsync            (1000, "bye") or (NULL, NULL) before connecting -> 0x817b1065; (NULL, "bye") -> 0x817b11fe; option set -> 0x817b11fe
sceHttp2SendRequestAsync on a WebSocket request -> 0, again while pending -> 0x817b1021
  sceHttp2WaitAsync completion: 0x8041013d (refused) or 0x804101e6 (unresolvable host); sends and closes then return that code
  error callback: called with the request id in both cases

Second run on 2026-10-30, same console and harness, Gran Turismo 7 01.700.000: the three calls went to ids 0x7777 and -1, a plain request, and a WebSocket request that had not connected (the payload created both requests and deleted them afterwards). Each call ran three times on each id. All 144 calls returned the values below, and none returned the stack check's 0x817b1076.

sceHttp2WebSocketSendTextMessageAsync  (NULL, 0, NULL, NULL), (NULL, 0xff, &asyncOption, NULL), ("hi", 0, NULL, &option)                                    -> 0x817b11fe
sceHttp2WebSocketSendDataMessageAsync  (NULL, 2, 0, NULL, NULL), (NULL, 0, 0, NULL, NULL), (NULL, -1, 0xff, &asyncOption, NULL), ("hi", 2, 0, NULL, &option)  -> 0x817b11fe
sceHttp2WebSocketCloseAsync            (NULL, "bye", 0, NULL, NULL), (&status, NULL, 0, NULL, &option)                                                      -> 0x817b11fe
all three, valid arguments             0x7777, -1 or a plain request -> 0x817b1100; the WebSocket request -> 0x817b1065

The callback check used libc srand as the error callback: after the wait, the game's next rand() matched the first rand() after srand(request id) and not the one after the seed set before the call.

Read from libSceHttp2.sprx (13.40, decrypted from the game's process; not shared) and not measured: null data and close callbacks are refused like the other two; the template is checked before the URL and a ping value before the request id; the sends do not check their flags, data size or async option before the connection check; the scheme comparison ignores case. The debt entry lists all but the first. The module tests a null text or data in the same branch as the option check (text 0x27e80, data 0x281e0, lookup 0x4e90), so the order between those two cannot be observed. BunnyFl's read and native run of the 13.42 module found the same null text/data order that the second run measured.

Tested

Windows 11 (build 26200), MinGW GCC (WinLibs 15.2) Release build with BUILD_TESTING=ON, each test run three times (ctest --repeat until-fail:3).

  • Head 324c6ddfe only changes the WebSocket debt entry, which now lists the null text/data order as measured. The code is that of da8fbc6c4.
  • Null text or data before the request id (head da8fbc6c4, main 9f748f4d8 merged, no conflicts): the 13 ctest entries of the libSceHttp2, libSceHttp and libSceHttpCache test executables (ctest -R ^guest_http) pass 13/13, each run three times, and so does main 9f748f4d8. Control, this head with the two send functions' old checks: guest_http2 aborts on a failed Require, and the other 12 pass. Control, main 9f748f4d8 with only this PR's GuestHttp2.cpp: guest_http2 aborts with sceHttp2WebSocketCreateRequest not implemented, and the other 12 pass.
  • Refreshed onto main bb04a4f1e (head c1b635f8e). The merge takes main's transport, request fields and asynchronous-request throws. It drops this PR's checks that sceHttp2SendRequestAsync throws on a WebSocket request and completes on a plain one, since that is a valid path that is not implemented. guest_http2_teardown_tests, which builds Export.cpp itself, now links libSceHttp for the URL parse. The 13 ctest entries of the libSceHttp2 and libSceHttp test executables pass 13/13, each run three times, and so does main bb04a4f1e.
  • Refreshed onto main ca6e29e83 (head 7231c2a2d; no conflicts): the five ctest entries below pass 5/5, and so does main ca6e29e83.
  • guest_http2_tests gains a WebSocket section: every argument check, with the receive buffer untouched or zeroed as on the console; bogus template and null URL; http and empty URLs; ws:/bad, wss and upper-case WS accepted; both ping ranges; ids 0, -1, 0x7777, a plain request, the template and the context; the value checked before the id; a null text or data refused before the id, for every one of those ids and for a WebSocket request that has not connected; sends and closes before connecting; deletion directly and through its template. One existing line, which expected sceHttp2WebSocketSetPingInterval(0, 1000000) to throw, now checks that a plain POST request gets 0x817B1100.
  • The five ctest entries that load libSceHttp2 or libSceHttp (guest_http2, guest_http, guest_http_response_header, guest_http_options, guest_memory_pool_stats):
    • This PR (939769ae4 on main bf77a9e9c; the pushed commit differs from it only in the debt text): 5/5.
    • Control: main bf77a9e9c with only this PR's GuestHttp2.cpp: guest_http2 fails (sceHttp2WebSocketCreateRequest not implemented), the other four pass.
    • main bf77a9e9c: 5/5.
  • Not run on Linux. tools/check_conventions.py --base origin/main passes.

Overlap

No open PR implements these six functions. #9598, #10167, #10534, #10536 and #11145, which changed libSceHttp2 next to this branch, are in main now, and this branch merges it.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none known (PPSA27836 imports the six functions; not run)
  • GPUs tested: n/a (no GPU code)
  • AI-assisted: yes (Claude Code)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5020168854 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11470). Originally posted by [frankea](https://github.com/frankea) on 2026-10-26T15:34:54Z. --- ### What Onimusha (PPSA27836) imports `sceHttp2WebSocketCreateRequest`, `sceHttp2WebSocketSetPingInterval`, `sceHttp2WebSocketSetPingTimeout`, `sceHttp2WebSocketSendTextMessageAsync`, `sceHttp2WebSocketSendDataMessageAsync` and `sceHttp2WebSocketCloseAsync`, and all six threw. They now answer as a PS5 does for a WebSocket request that has not connected, the only state this offline library has: - `sceHttp2WebSocketCreateRequest` checks its arguments, zeroes the receive buffer, checks the template and the URL, and returns a request id from the same registry as `sceHttp2CreateRequestWithURL`, so `sceHttp2DeleteRequest` and template deletion handle it. Like that function on `main`, the request takes the template's SSL context, capacity, version and settings, with method GET and the URL. The URL goes through `sceHttpUriParse`, so libSceHttp2 now links libSceHttp; the scheme must be ws or wss. - `sceHttp2WebSocketSetPingInterval` and `sceHttp2WebSocketSetPingTimeout` check their values and drop them (listed under Silent stubs). - Text and data sends and `sceHttp2WebSocketCloseAsync` return 0x817B1065 (not connected) for a WebSocket request and 0x817B1100 for any other id. Before the id is looked up, a set `option`, a null text or data, and a close reason without a status return 0x817B11FE. - `sceHttp2SendRequestAsync` throws for every valid request on `main` (its "asynchronous requests" debt entry), WebSocket requests included. On the PS5 the handshake fails offline like any other request, but the library also calls the request's error callback with the request id, from its own thread (measured below); the WebSocket debt entry records that. Measurement: PS5 on firmware 13.40, inside Gran Turismo 7 (PPSA01317), on 2026-10-26. A payload attached to the game with ptrace, created its own libnet pool, SSL context, Http2 context and template, called the game's `libSceHttp2` exports, and deleted everything afterwards. Connections went to a closed port on a LAN host and to an unresolvable `.invalid` name. ``` sceHttp2WebSocketCreateRequest null text callback, null error callback, null buffer, size 0, option set -> 0x817b11fe, buffer untouched unknown template -> 0x817b1100, buffer zeroed null URL -> 0x80433060, buffer zeroed "http://host:9/probe", "" -> 0x817b1061 "ws:/bad", "ws://host:9/probe", "wss://host:9/probe", "ws://x.invalid/" -> request id (0x6000000n) sceHttp2WebSocketSetPingInterval 0 -> 0; 999999 -> 0x817b11fe; 1000000, 0xffffffff -> 0 sceHttp2WebSocketSetPingTimeout 0, 999999 -> 0x817b11fe; 1000000, 0xffffffff -> 0 both: id 0x7777 or a plain request -> 0x817b1100 sceHttp2WebSocketSendTextMessageAsync before connecting -> 0x817b1065; option set -> 0x817b11fe; id 0x7777 or a plain request -> 0x817b1100 sceHttp2WebSocketSendDataMessageAsync before connecting -> 0x817b1065 sceHttp2WebSocketCloseAsync (1000, "bye") or (NULL, NULL) before connecting -> 0x817b1065; (NULL, "bye") -> 0x817b11fe; option set -> 0x817b11fe sceHttp2SendRequestAsync on a WebSocket request -> 0, again while pending -> 0x817b1021 sceHttp2WaitAsync completion: 0x8041013d (refused) or 0x804101e6 (unresolvable host); sends and closes then return that code error callback: called with the request id in both cases ``` Second run on 2026-10-30, same console and harness, Gran Turismo 7 01.700.000: the three calls went to ids 0x7777 and -1, a plain request, and a WebSocket request that had not connected (the payload created both requests and deleted them afterwards). Each call ran three times on each id. All 144 calls returned the values below, and none returned the stack check's 0x817b1076. ``` sceHttp2WebSocketSendTextMessageAsync (NULL, 0, NULL, NULL), (NULL, 0xff, &asyncOption, NULL), ("hi", 0, NULL, &option) -> 0x817b11fe sceHttp2WebSocketSendDataMessageAsync (NULL, 2, 0, NULL, NULL), (NULL, 0, 0, NULL, NULL), (NULL, -1, 0xff, &asyncOption, NULL), ("hi", 2, 0, NULL, &option) -> 0x817b11fe sceHttp2WebSocketCloseAsync (NULL, "bye", 0, NULL, NULL), (&status, NULL, 0, NULL, &option) -> 0x817b11fe all three, valid arguments 0x7777, -1 or a plain request -> 0x817b1100; the WebSocket request -> 0x817b1065 ``` The callback check used libc `srand` as the error callback: after the wait, the game's next `rand()` matched the first `rand()` after `srand(request id)` and not the one after the seed set before the call. Read from `libSceHttp2.sprx` (13.40, decrypted from the game's process; not shared) and not measured: null data and close callbacks are refused like the other two; the template is checked before the URL and a ping value before the request id; the sends do not check their flags, data size or async option before the connection check; the scheme comparison ignores case. The debt entry lists all but the first. The module tests a null text or data in the same branch as the `option` check (text `0x27e80`, data `0x281e0`, lookup `0x4e90`), so the order between those two cannot be observed. [BunnyFl's read and native run of the 13.42 module](https://github.com/boykopovar/AnyPS5/pull/11470#issuecomment-6512598091) found the same null text/data order that the second run measured. ### Tested Windows 11 (build 26200), MinGW GCC (WinLibs 15.2) Release build with `BUILD_TESTING=ON`, each test run three times (`ctest --repeat until-fail:3`). - Head 324c6ddfe only changes the WebSocket debt entry, which now lists the null text/data order as measured. The code is that of da8fbc6c4. - Null text or data before the request id (head da8fbc6c4, `main` 9f748f4d8 merged, no conflicts): the 13 ctest entries of the libSceHttp2, libSceHttp and libSceHttpCache test executables (`ctest -R ^guest_http`) pass 13/13, each run three times, and so does `main` 9f748f4d8. Control, this head with the two send functions' old checks: `guest_http2` aborts on a failed `Require`, and the other 12 pass. Control, `main` 9f748f4d8 with only this PR's `GuestHttp2.cpp`: `guest_http2` aborts with `sceHttp2WebSocketCreateRequest not implemented`, and the other 12 pass. - Refreshed onto `main` bb04a4f1e (head c1b635f8e). The merge takes `main`'s transport, request fields and asynchronous-request throws. It drops this PR's checks that `sceHttp2SendRequestAsync` throws on a WebSocket request and completes on a plain one, since that is a valid path that is not implemented. `guest_http2_teardown_tests`, which builds `Export.cpp` itself, now links libSceHttp for the URL parse. The 13 ctest entries of the libSceHttp2 and libSceHttp test executables pass 13/13, each run three times, and so does `main` bb04a4f1e. - Refreshed onto `main` ca6e29e83 (head 7231c2a2d; no conflicts): the five ctest entries below pass 5/5, and so does `main` ca6e29e83. - `guest_http2_tests` gains a WebSocket section: every argument check, with the receive buffer untouched or zeroed as on the console; bogus template and null URL; http and empty URLs; `ws:/bad`, wss and upper-case `WS` accepted; both ping ranges; ids 0, -1, 0x7777, a plain request, the template and the context; the value checked before the id; a null text or data refused before the id, for every one of those ids and for a WebSocket request that has not connected; sends and closes before connecting; deletion directly and through its template. One existing line, which expected `sceHttp2WebSocketSetPingInterval(0, 1000000)` to throw, now checks that a plain POST request gets 0x817B1100. - The five ctest entries that load libSceHttp2 or libSceHttp (`guest_http2`, `guest_http`, `guest_http_response_header`, `guest_http_options`, `guest_memory_pool_stats`): - This PR (939769ae4 on `main` bf77a9e9c; the pushed commit differs from it only in the debt text): 5/5. - Control: `main` bf77a9e9c with only this PR's `GuestHttp2.cpp`: `guest_http2` fails (`sceHttp2WebSocketCreateRequest not implemented`), the other four pass. - `main` bf77a9e9c: 5/5. - Not run on Linux. `tools/check_conventions.py --base origin/main` passes. ### Overlap No open PR implements these six functions. #9598, #10167, #10534, #10536 and #11145, which changed libSceHttp2 next to this branch, are in `main` now, and this branch merges it. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none known (PPSA27836 imports the six functions; not run) - [x] GPUs tested: n/a (no GPU code) - [x] AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-10-26 15:45:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T15:45:35Z.

Review: CHANGES_REQUESTED


I reviewed the WebSocket request and pre-connect behavior on exact head 3d7e2d2dcb43d0d1dd4a9a6833ad6a31b36dec2c. I found no concrete implementation defect in the request-handle ownership, URI scheme check, ping range validation, or pre-connect return paths. The PR reports a focused Windows suite repeated three times and a control run that fails only the new WebSocket case before the change. I did not independently run the Windows suite; hosted Linux/Windows product jobs are skipped.

Before approval, please sync this branch to current main (b0f1183ca12b) as required by CONTRIBUTING.md. The current branch is based on bf77a9e9cba4; the intervening commits do not touch the changed HTTP2 implementation/test/debt paths, and the merge-tree preview is clean. Current-main conventions and git diff --check pass.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5654816528 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11470#pullrequestreview-5654816528). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-26T15:45:35Z. **Review:** CHANGES_REQUESTED --- I reviewed the WebSocket request and pre-connect behavior on exact head `3d7e2d2dcb43d0d1dd4a9a6833ad6a31b36dec2c`. I found no concrete implementation defect in the request-handle ownership, URI scheme check, ping range validation, or pre-connect return paths. The PR reports a focused Windows suite repeated three times and a control run that fails only the new WebSocket case before the change. I did not independently run the Windows suite; hosted Linux/Windows product jobs are skipped. Before approval, please sync this branch to current `main` (`b0f1183ca12b`) as required by `CONTRIBUTING.md`. The current branch is based on `bf77a9e9cba4`; the intervening commits do not touch the changed HTTP2 implementation/test/debt paths, and the merge-tree preview is clean. Current-main conventions and `git diff --check` pass.
MarcZX10 commented 2026-10-29 07:56:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T07:56:44Z.

Review: CHANGES_REQUESTED


Re-review — changes requested

Two items remain before this PR is ready.

Findings

[P2] Do not pin a valid, unimplemented handshake to a throw

In GuestHttp2.cpp, the WebSocket request test expects sceHttp2SendRequestAsync(request, nullptr, 0, nullptr, &tag) to throw. This is a valid WebSocket request exercising the unimplemented handshake path. The production limitation and debt entry can remain, but the test should not require an unsupported path to throw. Please remove that assertion, as the reviewer requested, while retaining the supported pre-connect behavior tests.

[P2] Integrate current main and rerun the focused tests

The exact head 7231c2a2d66b95fda621ee713c3f4e661182213f is based on ca6e29e8363e3d10e9e6482bede3d19d6b9f0e6e. Current main is 4c7d275bef89d309313d16bc2bc05d37a1b50be2; the merge preview conflicts in libSceHttp2/CMakeLists.txt, Export.cpp, GuestHttp2.cpp, and docs/dev/debt/libSceHttp2.md. Please integrate current main, resolve those conflicts, and rerun the five focused CTest entries on the updated base and change.

Checks

  • git diff --check: clean.
  • tools/check_conventions.py: passed against current main.
  • Hosted product Linux/Windows jobs are skipped; the prior author-reported 5/5 runs are on the older ca6e29e merge.

I did not run a local build or CTest.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5694462491 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11470#pullrequestreview-5694462491). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T07:56:44Z. **Review:** CHANGES_REQUESTED --- # Re-review — changes requested Two items remain before this PR is ready. ## Findings ### [P2] Do not pin a valid, unimplemented handshake to a throw In `GuestHttp2.cpp`, the WebSocket request test expects `sceHttp2SendRequestAsync(request, nullptr, 0, nullptr, &tag)` to throw. This is a valid WebSocket request exercising the unimplemented handshake path. The production limitation and debt entry can remain, but the test should not require an unsupported path to throw. Please remove that assertion, as the reviewer requested, while retaining the supported pre-connect behavior tests. ### [P2] Integrate current main and rerun the focused tests The exact head `7231c2a2d66b95fda621ee713c3f4e661182213f` is based on `ca6e29e8363e3d10e9e6482bede3d19d6b9f0e6e`. Current `main` is `4c7d275bef89d309313d16bc2bc05d37a1b50be2`; the merge preview conflicts in `libSceHttp2/CMakeLists.txt`, `Export.cpp`, `GuestHttp2.cpp`, and `docs/dev/debt/libSceHttp2.md`. Please integrate current `main`, resolve those conflicts, and rerun the five focused CTest entries on the updated base and change. ## Checks - `git diff --check`: clean. - `tools/check_conventions.py`: passed against current `main`. - Hosted product Linux/Windows jobs are skipped; the prior author-reported 5/5 runs are on the older `ca6e29e` merge. I did not run a local build or CTest.
MarcZX10 commented 2026-10-29 19:08:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T19:08:52Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The updated head merges cleanly and its focused build succeeds, but the implementation returns a measured “not connected” result for malformed send/close arguments whose PS5 validation behavior is not established in the report.

What I ran

Reviewed head c1b635f8e49ffe98564f8a8b9c7b44b896f4bd5b against current main bb04a4f1ea0175e9e4f149f0359a764d62ff3296; git merge-tree --write-tree produced c23e17d0b831298250c1bffdd0535f9c158be798 without conflicts. Environment: Debian 12 x86_64, GCC 12.2.0, CMake 3.25.1; test binaries that require PS5 CPU features were run under QEMU TCG 7.2.22 (-cpu max).

git merge-tree --write-tree upstream/main HEAD
python3 tools/check_conventions.py --base upstream/main
git diff --check upstream/main...HEAD
cmake -S . -B /dev/shm/AnyPS5-build-12915-full -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
cmake --build /dev/shm/AnyPS5-build-12915-full --target guest_http2_tests guest_http2_cookie_tests guest_http2_options_tests guest_http2_transport_tests guest_http2_teardown_tests guest_http_tests guest_http_response_header_tests guest_http_options_tests guest_memory_pool_stats_tests --parallel 4
ctest --test-dir /dev/shm/AnyPS5-build-12915-full -R '^guest_http2$' --output-on-failure
cd /dev/shm/AnyPS5-build-12915-full
/usr/bin/qemu-x86_64 -cpu max -L / ./tests/guest_http_tests
LOCPATH=/dev/shm/AnyPS5-build-12915-full/core/libs/prx/libSceHttp/locales /usr/bin/qemu-x86_64 -cpu max -L / ./tests/guest_http_tests --uri-locale
/usr/bin/qemu-x86_64 -cpu max -L / ./tests/guest_http2_tests
/usr/bin/qemu-x86_64 -cpu max -L / ./tests/guest_http2_cookie_tests
/usr/bin/qemu-x86_64 -cpu max -L / ./tests/guest_http2_options_tests
/usr/bin/qemu-x86_64 -cpu max -L / ./tests/guest_http2_teardown_tests

Results

Check Result
Merge preview Clean; tree c23e17d0b831298250c1bffdd0535f9c158be798.
Conventions Passed.
git diff --check Passed; no output.
Focused HTTP/HTTP2 build Passed for the listed targets.
guest_http_tests Passed under QEMU TCG.
guest_http_tests --uri-locale Passed under QEMU TCG; the test reported its en_US.ISO8859-1 check.
guest_http2_tests Passed under QEMU TCG.
guest_http2_cookie_tests Passed under QEMU TCG.
guest_http2_options_tests Passed under QEMU TCG.
guest_http2_teardown_tests Passed under QEMU TCG.
Native guest_http2 CTest Could not run on this host: the project CPU guard rejects the Xeon E5-1620 v2 for missing PS5-required CPU features.
Public-header audit Not run separately; this diff changes no export declarations.
Unedited command output

Conventions:

All conventions checks passed.

Diff check: exit 0, no output.

Build command, final incremental build output:

[0/2] Re-checking globbed directories...
[1/6] Linking CXX executable tests/guest_http2_cookie_tests
[2/6] Linking CXX executable tests/guest_http2_options_tests
[3/6] Linking CXX executable tests/guest_memory_pool_stats_tests
[4/6] Linking CXX executable tests/guest_http2_transport_tests
[5/6] Building CXX object core/libs/prx/libSceHttp2/CMakeFiles/guest_http2_teardown_tests.dir/Export.cpp.o
[6/6] Linking CXX executable tests/guest_http2_teardown_tests

QEMU test commands, in order:

[src/HostCpu.cpp:193 operator()] host CPU QEMU TCG CPU version 2.5+: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, ADX, CLFLUSHOPT, CLWB, XSAVEOPT, SSE4A, OS AVX state (XCR0); lacks RDSEED, SHA, RDPID, XSAVEC, PREFETCHW, CLZERO
[src/HostCpu.cpp:193 operator()] host CPU QEMU TCG CPU version 2.5+: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, ADX, CLFLUSHOPT, CLWB, XSAVEOPT, SSE4A, OS AVX state (XCR0); lacks RDSEED, SHA, RDPID, XSAVEC, PREFETCHW, CLZERO
URI locale checks: en_US.ISO8859-1; classifies 0xE9 as alphabetic: yes
[src/HostCpu.cpp:193 operator()] host CPU QEMU TCG CPU version 2.5+: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, ADX, CLFLUSHOPT, CLWB, XSAVEOPT, SSE4A, OS AVX state (XCR0); lacks RDSEED, SHA, RDPID, XSAVEC, PREFETCHW, CLZERO
[memory] configured flexible memory: 0x1c000000 bytes (448 MiB)
[src/HostCpu.cpp:193 operator()] host CPU QEMU TCG CPU version 2.5+: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, ADX, CLFLUSHOPT, CLWB, XSAVEOPT, SSE4A, OS AVX state (XCR0); lacks RDSEED, SHA, RDPID, XSAVEC, PREFETCHW, CLZERO
[memory] configured flexible memory: 0x1c000000 bytes (448 MiB)
[memory] flexible memory exhausted: request 0xffffffffffffc000 with 0x10000 of 0x1c000000 in use
[memory] flexible memory exhausted: request 0x8000000000000000 with 0x10000 of 0x1c000000 in use
[src/HostCpu.cpp:193 operator()] host CPU QEMU TCG CPU version 2.5+: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, ADX, CLFLUSHOPT, CLWB, XSAVEOPT, SSE4A, OS AVX state (XCR0); lacks RDSEED, SHA, RDPID, XSAVEC, PREFETCHW, CLZERO
[memory] configured flexible memory: 0x1c000000 bytes (448 MiB)
[src/HostCpu.cpp:193 operator()] host CPU QEMU TCG CPU version 2.5+: has SSE, SSE2, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, ADX, CLFLUSHOPT, CLWB, XSAVEOPT, SSE4A, OS AVX state (XCR0); lacks RDSEED, SHA, RDPID, XSAVEC, PREFETCHW, CLZERO
[memory] configured flexible memory: 0x1c000000 bytes (448 MiB)

Native CTest:

Internal ctest changing into directory: /dev/shm/AnyPS5-build-12915-full
Test project /dev/shm/AnyPS5-build-12915-full
    Start 1990: guest_http2
1/1 Test #1990: guest_http2 ......................Subprocess aborted***Exception:   0.01 sec
[src/HostCpu.cpp:193 operator()] host CPU Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, CMPXCHG16B, LAHF/SAHF, AVX, F16C, AES, PCLMULQDQ, RDRAND, XSAVEOPT, OS AVX state (XCR0); lacks LZCNT, BMI1, BMI2, MOVBE, AVX2, FMA, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEC, SSE4A, PREFETCHW, CLZERO
[libc] unhandled exception 'St13runtime_error' thrown from 0x7f96d0979e87
terminate called after throwing an instance of 'std::runtime_error'
  what():  The host CPU (Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz) lacks LZCNT, BMI1, BMI2, MOVBE, AVX2, FMA. The PS5's Zen 2 CPU has these extensions and titles run their instructions natively, so this CPU cannot run them.


0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.17 sec

The following tests FAILED:
	1990 - guest_http2 (Subprocess aborted)
Errors while running CTest

Negative control replaced this PR's core/libs/prx/libSceHttp2/Export.cpp with current main's version, rebuilt guest_http2_tests, and ran it under QEMU. It aborted at the expected unimplemented WebSocket export with exit 134. I restored the exact PR file, rebuilt, and reran the test successfully.

Negative control

Assertion Change made to the code under test Did the test fail?
New WebSocket behavior is exercised Replaced PR Export.cpp with upstream/main Export.cpp, then rebuilt guest_http2_tests. Yes: sceHttp2WebSocketCreateRequest not implemented (exit 134). Restored the PR source and the test passed.

Findings

Blocking

Unverified argument validation in send/close calls. The PR tests valid text/data sends and close calls before connection, plus selected option and status/reason cases. The implementation ignores text, data, dataSize, flags, and asyncOption, then returns ERROR_NOT_CONNECTED for any live WebSocket handle. The report does not establish how the PS5 handles null message pointers, invalid sizes/flags, or async options before the pre-connect result is returned. The repository requires unknown general behavior to throw and be recorded as debt. Please verify the validation order from the 13.40 module or a console measurement and add focused tests, or keep unverified input cases on the unimplemented/debt path.

Non-blocking

  • The native Linux CTest run is unavailable on this Xeon host because it lacks CPU features required by the project; the focused binaries did run under QEMU TCG as listed above.
  • The author reports 13/13 focused Windows tests repeated three times on this head and on main; the hosted Windows job is green. The hosted Linux and specialized jobs are skipped.

Sources

Not verified

  • PS5 behavior for malformed message pointers, data sizes, flags, and async options before connection.
  • The hosted Linux and specialized jobs; all are skipped on this PR.
  • Physical-console behavior independently; the firmware measurements in the PR are author-reported.
  • The Windows test report was not reproduced locally.

To get this to a good state

Please add evidence and tests for the argument-validation cases above, or preserve them as unimplemented behavior with a debt entry. I’ll rerun the same convention, diff, build, and focused HTTP/HTTP2 commands on the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5703508639 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11470#pullrequestreview-5703508639). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T19:08:52Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The updated head merges cleanly and its focused build succeeds, but the implementation returns a measured “not connected” result for malformed send/close arguments whose PS5 validation behavior is not established in the report. ## What I ran Reviewed head `c1b635f8e49ffe98564f8a8b9c7b44b896f4bd5b` against current `main` `bb04a4f1ea0175e9e4f149f0359a764d62ff3296`; `git merge-tree --write-tree` produced `c23e17d0b831298250c1bffdd0535f9c158be798` without conflicts. Environment: Debian 12 x86_64, GCC 12.2.0, CMake 3.25.1; test binaries that require PS5 CPU features were run under QEMU TCG 7.2.22 (`-cpu max`). ```sh git merge-tree --write-tree upstream/main HEAD python3 tools/check_conventions.py --base upstream/main git diff --check upstream/main...HEAD cmake -S . -B /dev/shm/AnyPS5-build-12915-full -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON cmake --build /dev/shm/AnyPS5-build-12915-full --target guest_http2_tests guest_http2_cookie_tests guest_http2_options_tests guest_http2_transport_tests guest_http2_teardown_tests guest_http_tests guest_http_response_header_tests guest_http_options_tests guest_memory_pool_stats_tests --parallel 4 ctest --test-dir /dev/shm/AnyPS5-build-12915-full -R '^guest_http2$' --output-on-failure cd /dev/shm/AnyPS5-build-12915-full /usr/bin/qemu-x86_64 -cpu max -L / ./tests/guest_http_tests LOCPATH=/dev/shm/AnyPS5-build-12915-full/core/libs/prx/libSceHttp/locales /usr/bin/qemu-x86_64 -cpu max -L / ./tests/guest_http_tests --uri-locale /usr/bin/qemu-x86_64 -cpu max -L / ./tests/guest_http2_tests /usr/bin/qemu-x86_64 -cpu max -L / ./tests/guest_http2_cookie_tests /usr/bin/qemu-x86_64 -cpu max -L / ./tests/guest_http2_options_tests /usr/bin/qemu-x86_64 -cpu max -L / ./tests/guest_http2_teardown_tests ``` ## Results | Check | Result | |---|---| | Merge preview | Clean; tree `c23e17d0b831298250c1bffdd0535f9c158be798`. | | Conventions | Passed. | | `git diff --check` | Passed; no output. | | Focused HTTP/HTTP2 build | Passed for the listed targets. | | `guest_http_tests` | Passed under QEMU TCG. | | `guest_http_tests --uri-locale` | Passed under QEMU TCG; the test reported its en_US.ISO8859-1 check. | | `guest_http2_tests` | Passed under QEMU TCG. | | `guest_http2_cookie_tests` | Passed under QEMU TCG. | | `guest_http2_options_tests` | Passed under QEMU TCG. | | `guest_http2_teardown_tests` | Passed under QEMU TCG. | | Native `guest_http2` CTest | Could not run on this host: the project CPU guard rejects the Xeon E5-1620 v2 for missing PS5-required CPU features. | | Public-header audit | Not run separately; this diff changes no export declarations. | <details> <summary>Unedited command output</summary> Conventions: ```text All conventions checks passed. ``` Diff check: exit 0, no output. Build command, final incremental build output: ```text [0/2] Re-checking globbed directories... [1/6] Linking CXX executable tests/guest_http2_cookie_tests [2/6] Linking CXX executable tests/guest_http2_options_tests [3/6] Linking CXX executable tests/guest_memory_pool_stats_tests [4/6] Linking CXX executable tests/guest_http2_transport_tests [5/6] Building CXX object core/libs/prx/libSceHttp2/CMakeFiles/guest_http2_teardown_tests.dir/Export.cpp.o [6/6] Linking CXX executable tests/guest_http2_teardown_tests ``` QEMU test commands, in order: ```text [src/HostCpu.cpp:193 operator()] host CPU QEMU TCG CPU version 2.5+: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, ADX, CLFLUSHOPT, CLWB, XSAVEOPT, SSE4A, OS AVX state (XCR0); lacks RDSEED, SHA, RDPID, XSAVEC, PREFETCHW, CLZERO [src/HostCpu.cpp:193 operator()] host CPU QEMU TCG CPU version 2.5+: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, ADX, CLFLUSHOPT, CLWB, XSAVEOPT, SSE4A, OS AVX state (XCR0); lacks RDSEED, SHA, RDPID, XSAVEC, PREFETCHW, CLZERO URI locale checks: en_US.ISO8859-1; classifies 0xE9 as alphabetic: yes [src/HostCpu.cpp:193 operator()] host CPU QEMU TCG CPU version 2.5+: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, ADX, CLFLUSHOPT, CLWB, XSAVEOPT, SSE4A, OS AVX state (XCR0); lacks RDSEED, SHA, RDPID, XSAVEC, PREFETCHW, CLZERO [memory] configured flexible memory: 0x1c000000 bytes (448 MiB) [src/HostCpu.cpp:193 operator()] host CPU QEMU TCG CPU version 2.5+: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, ADX, CLFLUSHOPT, CLWB, XSAVEOPT, SSE4A, OS AVX state (XCR0); lacks RDSEED, SHA, RDPID, XSAVEC, PREFETCHW, CLZERO [memory] configured flexible memory: 0x1c000000 bytes (448 MiB) [memory] flexible memory exhausted: request 0xffffffffffffc000 with 0x10000 of 0x1c000000 in use [memory] flexible memory exhausted: request 0x8000000000000000 with 0x10000 of 0x1c000000 in use [src/HostCpu.cpp:193 operator()] host CPU QEMU TCG CPU version 2.5+: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, ADX, CLFLUSHOPT, CLWB, XSAVEOPT, SSE4A, OS AVX state (XCR0); lacks RDSEED, SHA, RDPID, XSAVEC, PREFETCHW, CLZERO [memory] configured flexible memory: 0x1c000000 bytes (448 MiB) [src/HostCpu.cpp:193 operator()] host CPU QEMU TCG CPU version 2.5+: has SSE, SSE2, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, ADX, CLFLUSHOPT, CLWB, XSAVEOPT, SSE4A, OS AVX state (XCR0); lacks RDSEED, SHA, RDPID, XSAVEC, PREFETCHW, CLZERO [memory] configured flexible memory: 0x1c000000 bytes (448 MiB) ``` Native CTest: ```text Internal ctest changing into directory: /dev/shm/AnyPS5-build-12915-full Test project /dev/shm/AnyPS5-build-12915-full Start 1990: guest_http2 1/1 Test #1990: guest_http2 ......................Subprocess aborted***Exception: 0.01 sec [src/HostCpu.cpp:193 operator()] host CPU Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, CMPXCHG16B, LAHF/SAHF, AVX, F16C, AES, PCLMULQDQ, RDRAND, XSAVEOPT, OS AVX state (XCR0); lacks LZCNT, BMI1, BMI2, MOVBE, AVX2, FMA, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEC, SSE4A, PREFETCHW, CLZERO [libc] unhandled exception 'St13runtime_error' thrown from 0x7f96d0979e87 terminate called after throwing an instance of 'std::runtime_error' what(): The host CPU (Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz) lacks LZCNT, BMI1, BMI2, MOVBE, AVX2, FMA. The PS5's Zen 2 CPU has these extensions and titles run their instructions natively, so this CPU cannot run them. 0% tests passed, 1 tests failed out of 1 Total Test time (real) = 0.17 sec The following tests FAILED: 1990 - guest_http2 (Subprocess aborted) Errors while running CTest ``` Negative control replaced this PR's `core/libs/prx/libSceHttp2/Export.cpp` with current `main`'s version, rebuilt `guest_http2_tests`, and ran it under QEMU. It aborted at the expected unimplemented WebSocket export with exit 134. I restored the exact PR file, rebuilt, and reran the test successfully. </details> ## Negative control | Assertion | Change made to the code under test | Did the test fail? | |---|---|---| | New WebSocket behavior is exercised | Replaced PR `Export.cpp` with `upstream/main` `Export.cpp`, then rebuilt `guest_http2_tests`. | Yes: `sceHttp2WebSocketCreateRequest not implemented` (exit 134). Restored the PR source and the test passed. | ## Findings ### Blocking **Unverified argument validation in send/close calls.** The PR tests valid text/data sends and close calls before connection, plus selected `option` and status/reason cases. The implementation ignores `text`, `data`, `dataSize`, `flags`, and `asyncOption`, then returns `ERROR_NOT_CONNECTED` for any live WebSocket handle. The report does not establish how the PS5 handles null message pointers, invalid sizes/flags, or async options before the pre-connect result is returned. The repository requires unknown general behavior to throw and be recorded as debt. Please verify the validation order from the 13.40 module or a console measurement and add focused tests, or keep unverified input cases on the unimplemented/debt path. ### Non-blocking - The native Linux CTest run is unavailable on this Xeon host because it lacks CPU features required by the project; the focused binaries did run under QEMU TCG as listed above. - The author reports 13/13 focused Windows tests repeated three times on this head and on `main`; the hosted Windows job is green. The hosted Linux and specialized jobs are skipped. ## Sources - [Changed send/close implementation at head `c1b635f8e49ffe98564f8a8b9c7b44b896f4bd5b`](https://github.com/boykopovar/AnyPS5/blob/c1b635f8e49ffe98564f8a8b9c7b44b896f4bd5b/core/libs/prx/libSceHttp2/Export.cpp#L432-L454) - [Changed argument coverage at head `c1b635f8e49ffe98564f8a8b9c7b44b896f4bd5b`](https://github.com/boykopovar/AnyPS5/blob/c1b635f8e49ffe98564f8a8b9c7b44b896f4bd5b/core/libs/tests/GuestHttp2.cpp#L79-L121) - [Repository rule for unknown behavior at current base `bb04a4f1ea0175e9e4f149f0359a764d62ff3296`](https://github.com/boykopovar/AnyPS5/blob/bb04a4f1ea0175e9e4f149f0359a764d62ff3296/AGENTS.md#L6-L7) - [Evidence and behavior-source requirements at current base `bb04a4f1ea0175e9e4f149f0359a764d62ff3296`](https://github.com/boykopovar/AnyPS5/blob/bb04a4f1ea0175e9e4f149f0359a764d62ff3296/docs/dev/REVERSE_ENGINEERING.md#L75-L86) - [Author's updated Windows test report](https://github.com/boykopovar/AnyPS5/pull/11470#issuecomment-6502432197) ## Not verified - PS5 behavior for malformed message pointers, data sizes, flags, and async options before connection. - The hosted Linux and specialized jobs; all are skipped on this PR. - Physical-console behavior independently; the firmware measurements in the PR are author-reported. - The Windows test report was not reproduced locally. ## To get this to a good state Please add evidence and tests for the argument-validation cases above, or preserve them as unimplemented behavior with a debt entry. I’ll rerun the same convention, diff, build, and focused HTTP/HTTP2 commands on the updated head.
MarcZX10 commented 2026-10-30 01:24:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T01:24:24Z.

Review: CHANGES_REQUESTED


Re-checked — new evidence, changes requested

The firmware-module report identifies a concrete validation-order mismatch in the two asynchronous send calls at head c1b635f8e49ffe98564f8a8b9c7b44b896f4bd5b.

Finding

For firmware 13.42, the author reports that null text or data returns 0x817b11fe before request-ID lookup, including with IDs 1, 0x7777, and -1; valid arguments with ID 1 reach the later 0x817b1100 request-type error. In the reviewed head, sceHttp2WebSocketSendTextMessageAsync and sceHttp2WebSocketSendDataMessageAsync ignore those pointers and return based on IsWebSocket, so they do not preserve the measured null-argument precedence. Please reject null text/data with ERROR_INVALID_VALUE before IsWebSocket and add regression cases that pin the error precedence. The relevant implementation is pinned to this head; the reported firmware-module evidence is from a native x86-64 run with imports stubbed, not a console run.

Not verified

I did not independently reproduce the firmware-module result or rerun local tests for this follow-up. The latest hosted Windows job passes; Linux and specialized jobs are skipped for this PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5707035699 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11470#pullrequestreview-5707035699). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T01:24:24Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new evidence, changes requested The firmware-module report identifies a concrete validation-order mismatch in the two asynchronous send calls at head `c1b635f8e49ffe98564f8a8b9c7b44b896f4bd5b`. ### Finding For firmware 13.42, the author reports that null `text` or `data` returns `0x817b11fe` before request-ID lookup, including with IDs 1, `0x7777`, and -1; valid arguments with ID 1 reach the later `0x817b1100` request-type error. In the reviewed head, `sceHttp2WebSocketSendTextMessageAsync` and `sceHttp2WebSocketSendDataMessageAsync` ignore those pointers and return based on `IsWebSocket`, so they do not preserve the measured null-argument precedence. Please reject null `text`/`data` with `ERROR_INVALID_VALUE` before `IsWebSocket` and add regression cases that pin the error precedence. The relevant implementation is [pinned to this head](https://github.com/boykopovar/AnyPS5/blob/c1b635f8e49ffe98564f8a8b9c7b44b896f4bd5b/core/libs/prx/libSceHttp2/Export.cpp#L439-L454); the [reported firmware-module evidence](https://github.com/boykopovar/AnyPS5/pull/11470#issuecomment-6512598091) is from a native x86-64 run with imports stubbed, not a console run. ### Not verified I did not independently reproduce the firmware-module result or rerun local tests for this follow-up. The latest hosted Windows job passes; Linux and specialized jobs are skipped for this PR.
MarcZX10 commented 2026-11-01 02:39:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T02:39:14Z.

Review: DISMISSED


Re-checked — new head, changes requested

The null text/data validation was added, but unsupported dataSize, flags, and async-option combinations still return ERROR_NOT_CONNECTED without evidence that firmware validates them that way.

What I ran

Reviewed head 324c6ddfe2e7439334de792f31110652e2f3bd2e against PR base 9f748f4d8e36ce3714f3b95f3386316e110a9b22; the merge preview against current main cf79276fee2f042feb6a7c71d0d6a27e9cfe2592 is clean. Environment: Debian Linux x86-64, Python 3.11.2; no local build or tests.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 11470
git diff --check 9f748f4d8e36ce3714f3b95f3386316e110a9b22...324c6ddfe2e7439334de792f31110652e2f3bd2e

Results

Check Result
Diff and conventions Passed.
Current-main merge preview Clean.
Hosted checks Eligibility, conventions, portability, labels, report and Windows passed; Linux and specialized product jobs were skipped.
Focused tests Author reports 13/13 HTTP/HTTP2 tests passing three times on Windows for the preceding code head; this latest head only updates the debt entry. I did not reproduce them locally.
Optional ABI/test-quality helpers The isolated PR snapshot lacks these scripts, so those optional checks could not run.

Findings

Blocking

Unmeasured validation before the pre-connect result. In sceHttp2WebSocketSendDataMessageAsync, dataSize, flags, and asyncOption are ignored; sceHttp2WebSocketSendTextMessageAsync ignores flags and asyncOption; sceHttp2WebSocketCloseAsync also ignores flags and asyncOption. For a live WebSocket handle, these calls return ERROR_NOT_CONNECTED even for combinations whose firmware validation order is not established in the report. The tests cover null message pointers, option, and selected status/reason cases, but do not pin these remaining inputs. Please add firmware/console evidence and tests for their precedence, or preserve the unverified input cases on the unimplemented/debt path.

Non-blocking

The declared #14236 ordering is documented; no source overlap issue was found on this head.

Sources

Not verified

I did not independently reproduce the firmware measurements or run a local build/CTest. Linux and specialized hosted jobs were skipped.

To get this to a good state

Establish and test the validation order for dataSize, flags, and async options, or leave those unmeasured combinations unimplemented with debt notes. I’ll rerun the same no-build checks and review the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5726108884 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11470#pullrequestreview-5726108884). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T02:39:14Z. **Review:** DISMISSED --- # Re-checked — new head, changes requested The null `text`/`data` validation was added, but unsupported `dataSize`, `flags`, and async-option combinations still return `ERROR_NOT_CONNECTED` without evidence that firmware validates them that way. ## What I ran Reviewed head `324c6ddfe2e7439334de792f31110652e2f3bd2e` against PR base `9f748f4d8e36ce3714f3b95f3386316e110a9b22`; the merge preview against current `main` `cf79276fee2f042feb6a7c71d0d6a27e9cfe2592` is clean. Environment: Debian Linux x86-64, Python 3.11.2; no local build or tests. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 11470 git diff --check 9f748f4d8e36ce3714f3b95f3386316e110a9b22...324c6ddfe2e7439334de792f31110652e2f3bd2e ``` ## Results | Check | Result | |---|---| | Diff and conventions | Passed. | | Current-main merge preview | Clean. | | Hosted checks | Eligibility, conventions, portability, labels, report and Windows passed; Linux and specialized product jobs were skipped. | | Focused tests | Author reports 13/13 HTTP/HTTP2 tests passing three times on Windows for the preceding code head; this latest head only updates the debt entry. I did not reproduce them locally. | | Optional ABI/test-quality helpers | The isolated PR snapshot lacks these scripts, so those optional checks could not run. | ## Findings ### Blocking **Unmeasured validation before the pre-connect result.** In `sceHttp2WebSocketSendDataMessageAsync`, `dataSize`, `flags`, and `asyncOption` are ignored; `sceHttp2WebSocketSendTextMessageAsync` ignores `flags` and `asyncOption`; `sceHttp2WebSocketCloseAsync` also ignores `flags` and `asyncOption`. For a live WebSocket handle, these calls return `ERROR_NOT_CONNECTED` even for combinations whose firmware validation order is not established in the report. The tests cover null message pointers, `option`, and selected status/reason cases, but do not pin these remaining inputs. Please add firmware/console evidence and tests for their precedence, or preserve the unverified input cases on the unimplemented/debt path. ### Non-blocking The declared #14236 ordering is documented; no source overlap issue was found on this head. ## Sources - [Send and close implementations at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/324c6ddfe2e7439334de792f31110652e2f3bd2e/core/libs/prx/libSceHttp2/Export.cpp) - [WebSocket argument tests at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/324c6ddfe2e7439334de792f31110652e2f3bd2e/core/libs/tests/GuestHttp2.cpp) - [Author’s firmware evidence for the newly measured null-pointer order](https://github.com/boykopovar/AnyPS5/pull/11470#issuecomment-6512598091) ## Not verified I did not independently reproduce the firmware measurements or run a local build/CTest. Linux and specialized hosted jobs were skipped. ## To get this to a good state Establish and test the validation order for `dataSize`, `flags`, and async options, or leave those unmeasured combinations unimplemented with debt notes. I’ll rerun the same no-build checks and review the updated head.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!11470
No description provided.