fix(libkernel): return EFAULT from sceKernelWriteThrottlingStatus for an unwritable store #13443

Merged
DeveshB-1 merged 1 commit from upstream-pr/13443 into main 2026-10-30 21:48:13 +00:00
DeveshB-1 commented 2026-10-30 14:45:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DeveshB-1 on 2026-10-30T14:45:12Z.


What

Safely copy write throttling status in sceKernelWriteThrottlingStatus using GuestCopyOut_nid_no_patch so that an unwritable status pointer returns SCE_KERNEL_ERROR_EFAULT (0x8002000e) instead of crashing the host process with SIGSEGV.

Tested

Linux x86_64 (AMD Ryzen 7 7730U):

  • guest_filesystem passes 3 of 3 (ctest --test-dir build -R '^guest_filesystem$' --repeat until-fail:3 -V).
  • Negative control: on unmodified main, passing an unwritable pointer crashes deterministically with SIGSEGV (***Exception: SegFault 0.09 sec). With this fix applied, the function safely returns 0x8002000e.
  • python3 tools/check_conventions.py --base origin/main reports zero findings.
  • python3 tools/pr_overlap.py --branch fix/write-throttling-efault reports no conflicting open pull requests implementing the same function.

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
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5086192131 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13443). Originally posted by [DeveshB-1](https://github.com/DeveshB-1) on 2026-10-30T14:45:12Z. --- ### What Safely copy write throttling status in `sceKernelWriteThrottlingStatus` using `GuestCopyOut_nid_no_patch` so that an unwritable status pointer returns `SCE_KERNEL_ERROR_EFAULT` (`0x8002000e`) instead of crashing the host process with `SIGSEGV`. ### Tested Linux x86_64 (AMD Ryzen 7 7730U): - `guest_filesystem` passes 3 of 3 (`ctest --test-dir build -R '^guest_filesystem$' --repeat until-fail:3 -V`). - Negative control: on unmodified `main`, passing an unwritable pointer crashes deterministically with `SIGSEGV` (`***Exception: SegFault 0.09 sec`). With this fix applied, the function safely returns `0x8002000e`. - `python3 tools/check_conventions.py --base origin/main` reports zero findings. - `python3 tools/pr_overlap.py --branch fix/write-throttling-efault` reports no conflicting open pull requests implementing the same function. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 - [x] GPUs tested: n/a - [x] AI-assisted: yes
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!13443
No description provided.