fix(libkernel): report stream writes as unsupported from libkernel #18654

Merged
DealPotato merged 2 commits from upstream-pr/18654 into main 2026-11-18 23:47:07 +00:00
DealPotato commented 2026-11-12 00:01:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DealPotato on 2026-11-12T00:01:57Z.


What

WWE 2K26 (PPSA34299) imports the seven sceKernelStreamWrite* functions from libkernel. On main it stops about 40 s after boot with sceKernelStreamWriteCreate not implemented.

They move from libkernel_sys to libkernel, where the title imports them, and report that stream writes are unsupported: sceKernelStreamWriteCreate fails with ENOSYS and the others with EBADF, as no stream can exist. The title skips its write cache when they fail. The gap (arguments not decoded, console results not measured) is recorded in technical debt.

Tested

Windows 11 Pro (build 26300). WWE 2K26 (PPSA34299 01.018.000) on main (3a0a54bbd8) stops about 40 s after boot at sceKernelStreamWriteCreate not implemented. With this change, in a build that also held four other fixes for the title on other code, it runs past that point and stops about 50 s later at an unrelated check (a runtime image descriptor of a compute shader). No focused test: the change only moves the exports and sets their return values.

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: PPSA34299 (WWE 2K26; no Game bring-up discussion yet)
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5268725678 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18654). Originally posted by [DealPotato](https://github.com/DealPotato) on 2026-11-12T00:01:57Z. --- ### What WWE 2K26 (PPSA34299) imports the seven `sceKernelStreamWrite*` functions from libkernel. On `main` it stops about 40 s after boot with `sceKernelStreamWriteCreate not implemented`. They move from libkernel_sys to libkernel, where the title imports them, and report that stream writes are unsupported: `sceKernelStreamWriteCreate` fails with `ENOSYS` and the others with `EBADF`, as no stream can exist. The title skips its write cache when they fail. The gap (arguments not decoded, console results not measured) is recorded in technical debt. ### Tested Windows 11 Pro (build 26300). WWE 2K26 (PPSA34299 01.018.000) on `main` (3a0a54bbd8) stops about 40 s after boot at `sceKernelStreamWriteCreate not implemented`. With this change, in a build that also held four other fixes for the title on other code, it runs past that point and stops about 50 s later at an unrelated check (a runtime image descriptor of a compute shader). No focused test: the change only moves the exports and sets their return values. ### 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: PPSA34299 (WWE 2K26; no Game bring-up discussion yet) - [x] GPUs tested: n/a - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-12 00:33:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T00:33:34Z.

Review: APPROVED


Reviewed — looks good

The seven stream-write exports now resolve from libkernel and return explicit unsupported/no-stream errors; I found no blocking issue in the reviewed diff.

What I ran

Head c78166e4dd82fc232fa52b460effcc207f545753; base 80b5a5016f352cf0298bd32f16653c96007dab4a. Environment: Debian 12, Python 3.11.2, GCC 12.2.0.

git diff --check 80b5a5016f352cf0298bd32f16653c96007dab4a...c78166e4dd82fc232fa52b460effcc207f545753
/usr/bin/python3 tools/check_conventions.py --base 80b5a5016f352cf0298bd32f16653c96007dab4a --head c78166e4dd82fc232fa52b460effcc207f545753 --title 'fix(libkernel): report stream writes as unsupported from libkernel' --body /tmp/anyps5-pr-precheck-18654/pr-body.md
/usr/bin/python3 /marc/AnyPS5/tools/pr_abi_audit.py --base 80b5a5016f352cf0298bd32f16653c96007dab4a --head c78166e4dd82fc232fa52b460effcc207f545753 --json
/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 18654 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck-18654/stack
/usr/bin/python3 /marc/AnyPS5/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck-18654/head-c78166e4dd82-24211b9b --json core/libs/prx/libkernel/Unimplemented.cpp core/libs/prx/libkernel/include/Api.hpp core/libs/prx/libkernel_sys/Export.Discovery.cpp core/libs/prx/libkernel_sys/include/Api.hpp docs/dev/debt/libkernel.md

The PR description reports that WWE 2K26 passed the previous StreamWriteCreate failure point in a build containing this PR and four other fixes; that run does not isolate this change.

Results

Check Result Note
Diff whitespace passed Exit 0.
Conventions passed “All conventions checks passed.”
Export ABI audit passed with warnings No blocking finding reported; this lexical audit does not prove binary ABI correctness.
Dependency/mergeability passed Report says the PR merges cleanly with current main.
Test-quality heuristic passed No findings.
Build and focused test not run locally The PR reports a combined game run; no isolated test is included.

Findings

Blocking

None.

Non-blocking

The return values are documented as not measured on a PS5. The PR records this limitation in the debt entry; the combined game run is useful integration evidence but does not confirm the console’s exact errors.

Sources

Not verified

  • No local build, focused test, or PS5 run was performed. The title run is author-reported and included four other fixes.
  • Exact return values on console remain unmeasured, as documented by the PR.

To get this to a good state

No follow-up is required for the reviewed head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5867223258 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18654#pullrequestreview-5867223258). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-12T00:33:34Z. **Review:** APPROVED --- # Reviewed — looks good The seven stream-write exports now resolve from `libkernel` and return explicit unsupported/no-stream errors; I found no blocking issue in the reviewed diff. ## What I ran Head `c78166e4dd82fc232fa52b460effcc207f545753`; base `80b5a5016f352cf0298bd32f16653c96007dab4a`. Environment: Debian 12, Python 3.11.2, GCC 12.2.0. ```sh git diff --check 80b5a5016f352cf0298bd32f16653c96007dab4a...c78166e4dd82fc232fa52b460effcc207f545753 /usr/bin/python3 tools/check_conventions.py --base 80b5a5016f352cf0298bd32f16653c96007dab4a --head c78166e4dd82fc232fa52b460effcc207f545753 --title 'fix(libkernel): report stream writes as unsupported from libkernel' --body /tmp/anyps5-pr-precheck-18654/pr-body.md /usr/bin/python3 /marc/AnyPS5/tools/pr_abi_audit.py --base 80b5a5016f352cf0298bd32f16653c96007dab4a --head c78166e4dd82fc232fa52b460effcc207f545753 --json /usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 18654 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck-18654/stack /usr/bin/python3 /marc/AnyPS5/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck-18654/head-c78166e4dd82-24211b9b --json core/libs/prx/libkernel/Unimplemented.cpp core/libs/prx/libkernel/include/Api.hpp core/libs/prx/libkernel_sys/Export.Discovery.cpp core/libs/prx/libkernel_sys/include/Api.hpp docs/dev/debt/libkernel.md ``` The PR description reports that WWE 2K26 passed the previous `StreamWriteCreate` failure point in a build containing this PR and four other fixes; that run does not isolate this change. ## Results | Check | Result | Note | |---|---|---| | Diff whitespace | passed | Exit 0. | | Conventions | passed | “All conventions checks passed.” | | Export ABI audit | passed with warnings | No blocking finding reported; this lexical audit does not prove binary ABI correctness. | | Dependency/mergeability | passed | Report says the PR merges cleanly with current `main`. | | Test-quality heuristic | passed | No findings. | | Build and focused test | not run locally | The PR reports a combined game run; no isolated test is included. | ## Findings ### Blocking None. ### Non-blocking The return values are documented as not measured on a PS5. The PR records this limitation in the debt entry; the combined game run is useful integration evidence but does not confirm the console’s exact errors. ## Sources - [Moved stream-write implementations at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/c78166e4dd82fc232fa52b460effcc207f545753/core/libs/prx/libkernel/Unimplemented.cpp#L147-L173) - [New libkernel declarations at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/c78166e4dd82fc232fa52b460effcc207f545753/core/libs/prx/libkernel/include/Api.hpp#L165-L177) - [Technical-debt entry records the unmeasured console behavior](https://github.com/boykopovar/AnyPS5/blob/c78166e4dd82fc232fa52b460effcc207f545753/docs/dev/debt/libkernel.md#L169) ## Not verified - No local build, focused test, or PS5 run was performed. The title run is author-reported and included four other fixes. - Exact return values on console remain unmeasured, as documented by the PR. ## To get this to a good state No follow-up is required for the reviewed head.
MarcZX10 commented 2026-11-17 10:40:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T10:40:55Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this; the points below are optional.

What I ran

Head e795140d9fd2e98691d01bfa76d84f1f4ab45f86, base main. No merged-preview check and no build. Repository reads went through the reader pinned to the head.

python3 repo_read.py search sceKernelStreamWrite
python3 repo_read.py search SCE_KERNEL_ERROR_ENOSYS
python3 repo_read.py search KernelErrors.hpp
python3 repo_read.py search SCE_KERNEL_ERROR_EBADF core/libs/prx/libkernel/KernelErrors.hpp
python3 repo_read.py search "Silent stubs" docs/dev/debt/libkernel.md

Results

Check Result Note
Seven functions defined once at head passed Only in libkernel Unimplemented.cpp
Old libkernel_sys definitions removed passed No other reference at head
ENOSYS and EBADF constants passed In KernelErrors.hpp
Build and link not run Not built here
Tests not run The PR adds no focused test
Author's console run not run Author-reported (Windows, PPSA34299), not reproduced here

Findings

Blocking

None.

Non-blocking

  • core/libs/prx/libkernel/Unimplemented.cpp:51: the PR checklist ticks "Unimplemented paths throw (NotImplemented_nid_no_patch)", but these seven functions now return error codes and no longer throw. The behaviour is deliberate and documented, so the checklist line should say it is an exception, or the box should be left unticked.
  • docs/dev/debt/libkernel.md:160: the new entry sits under ### Functional. The checklist sends silent stubs to ### Silent stubs (line 3 of the same file). Moving the entry there would match the stated convention.

Not verified

  • Build, link and the libkernel export of the seven names by name were not checked.
  • ENOSYS and EBADF on the console are not measured; the PR says so and the debt entry records it.
  • docs/dev/CONVENTIONS.md was not read, so the checklist's convention claims are checked only against the diff.
  • Of the changed files, Export.Discovery.cpp and libkernel_sys/include/Api.hpp were read only through their diff hunks and head searches, not in full. Unimplemented.cpp, libkernel/include/Api.hpp and docs/dev/debt/libkernel.md were read through their diff hunks too.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5936949727 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18654#pullrequestreview-5936949727). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-17T10:40:55Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this; the points below are optional. ## What I ran Head `e795140d9fd2e98691d01bfa76d84f1f4ab45f86`, base `main`. No merged-preview check and no build. Repository reads went through the reader pinned to the head. ``` python3 repo_read.py search sceKernelStreamWrite python3 repo_read.py search SCE_KERNEL_ERROR_ENOSYS python3 repo_read.py search KernelErrors.hpp python3 repo_read.py search SCE_KERNEL_ERROR_EBADF core/libs/prx/libkernel/KernelErrors.hpp python3 repo_read.py search "Silent stubs" docs/dev/debt/libkernel.md ``` ## Results | Check | Result | Note | | --- | --- | --- | | Seven functions defined once at head | passed | Only in libkernel `Unimplemented.cpp` | | Old libkernel_sys definitions removed | passed | No other reference at head | | `ENOSYS` and `EBADF` constants | passed | In `KernelErrors.hpp` | | Build and link | not run | Not built here | | Tests | not run | The PR adds no focused test | | Author's console run | not run | Author-reported (Windows, PPSA34299), not reproduced here | ## Findings ### Blocking None. ### Non-blocking - `core/libs/prx/libkernel/Unimplemented.cpp:51`: the PR checklist ticks "Unimplemented paths throw (`NotImplemented_nid_no_patch`)", but these seven functions now return error codes and no longer throw. The behaviour is deliberate and documented, so the checklist line should say it is an exception, or the box should be left unticked. - `docs/dev/debt/libkernel.md:160`: the new entry sits under `### Functional`. The checklist sends silent stubs to `### Silent stubs` (line 3 of the same file). Moving the entry there would match the stated convention. ## Not verified - Build, link and the libkernel export of the seven names by name were not checked. - `ENOSYS` and `EBADF` on the console are not measured; the PR says so and the debt entry records it. - `docs/dev/CONVENTIONS.md` was not read, so the checklist's convention claims are checked only against the diff. - Of the changed files, `Export.Discovery.cpp` and `libkernel_sys/include/Api.hpp` were read only through their diff hunks and head searches, not in full. `Unimplemented.cpp`, `libkernel/include/Api.hpp` and `docs/dev/debt/libkernel.md` were read through their diff hunks too. ## To get this to a good state Nothing is required.
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!18654
No description provided.