fix(libkernel): fail read, write and seek on a ksem id as FreeBSD 11.4's ksem_ops does #24487

Merged
brajankw merged 1 commit from upstream-pr/24487 into main 2026-11-25 22:36:56 +00:00
brajankw commented 2026-11-20 17:28:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by brajankw on 2026-11-20T17:28:42Z.


What

A ksem id is a descriptor reserved on the host null device here, so read returned 0, write the length, and lseek and pread 0. FreeBSD 11.4's ksem_ops reads and writes through invfo_rdwr and is not seekable:

  • read, write, readv, writev and their sceKernel forms fail with EOPNOTSUPP; a zero-length read returns 0 first, as dofileread finishes it before the file's read, while a zero-length write fails.
  • lseek, pread, pwrite, preadv, pwritev and their sceKernel forms fail with ESPIPE, before the whence and offset checks, as kern_lseek answers ESPIPE before fo_seek sees whence. lseek no longer checks whence first for a ksem id; a kqueue, a socket or a pipe still gets EINVAL there for a bad whence, as before.
  • A null buffer no longer turns a read or write into EFAULT, as invfo_rdwr touches no buffer. #24486, now merged, does the same for a kqueue on the same line.
  • These answers sit beside the existing kqueue ones, which use the same invfo_rdwr.
  • IsKsemDescriptor, which this uses, is replaced by DuplicateKsemDescriptor in open #22191. The two merge without a textual conflict, but whichever lands second needs a rebase that keeps a ksem predicate, or the build breaks. I will rebase this as soon as #22191 lands.
  • Tests: Transfers in GuestKernelSysKsem.cpp calls every POSIX and sceKernel read, write and seek entry point, including a bad whence, zero-length pread and pwrite, preadv with count 0 and pwritev with a zero-length vector; the semaphore's value is unchanged afterwards.
  • Debt: no fragment. The ksem entry never listed these calls.

Tested

Linux (Debian 13, GCC 14.2.0, Release). Head f78c18f92a, rebased onto main 14e9b90825 after #24960 merged; the only conflict was sceKernelLseek, which #24960 wraps in File::RunKernelFileCall. The runs after the first two bullets are from earlier heads.

  • At f78c18f92a, with #24488 on top: ctest -R '^guest_(kernel_sys_ksem|kqueue|kqueue_cleared_race)$': 3/3 passed. This head adds sceKernelWritev, sceKernelPwrite and sceKernelPreadv calls to Transfers.
  • At dc5a8ef290, merged with my eight other updated branches onto main bd9a6c00a6: ctest over the 23 tests these branches touch (guest_kernel_ioctl_fionread, guest_kernel_ioctl_device_type, guest_kernel_fcntl*, guest_kernel_app_archive_*, guest_kernel_sys_ksem, guest_kqueue, guest_equeue_events, guest_socket_events, guest_system_configuration, guest_socket_pair, guest_recvmsg_memory, guest_kernel_sys_cpuset, np_uds_events, guest_np_uds_* and guest_np_trophy_*): all pass. With the lseek change reverted, guest_kernel_sys_ksem fails at the new lseek(d, 0, 7) check.
  • Negative control: with only the test change, on main 84e16538d4, guest_kernel_sys_ksem fails at the first new read check.
  • On f00eb79b35, ctest over guest_kernel_sys_ksem, guest_kqueue, guest_kernel_sys, guest_filesystem, guest_file_vector, guest_kernel_sys_aio, guest_equeue_events, guest_kernel_fcntl, guest_kernel_ioctl_fionread and guest_kernel_ioctl_device_type: all 10 pass.
  • Full ctest (6393 tests, -j 12) on this branch and my other eleven branches of this round, merged onto main 84e16538d4: 6378 passed. The 15 failures also fail on main in this environment:
    • nine need a .git directory, network access or a passwd entry for the user: conventions_git_errors, test_script_registration, web_library_assets, title_run, title_run_identity, guest_kernel_sys_login, guest_net_ctl, guest_getlogin and guest_getlogin_no_session;
    • five agc_driver GPU cases fail the same way on main: prepared_shaders with its indirect, uncached and debug forms, and storage_file_write;
    • agc_driver_image_table_packed_guards is unstable on main as well (2 of 10 runs passed on its own on main 3f4693be43).
  • python3 tools/check_conventions.py --base origin/main: passed.
  • python3 tools/pr_overlap.py --branch fix/libkernel-ksem-read-write-seek: #22191 adds a call in the same place of GuestKernelSysKsem.cpp's main (line 300), so whichever lands second needs a rebase, which also covers the IsKsemDescriptor point above; could not compare #6936, #7121, #7447, #9293, #9297, #9302, #12682, #12688, #12700, #12965 and #15037, which conflict with main; none of them changes the ksem or kqueue checks this touches.
  • python3 tools/pr_overlap.py --branch on the stack at ad4b485923 (#24488 on this head): only #22191 (the test main line above) is listed as conflicting.
  • Not tested on Windows or macOS. No title.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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:5417565929 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24487). Originally posted by [brajankw](https://github.com/brajankw) on 2026-11-20T17:28:42Z. --- ### What A ksem id is a descriptor reserved on the host null device here, so `read` returned 0, `write` the length, and `lseek` and `pread` 0. FreeBSD 11.4's [`ksem_ops`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/sys/kern/uipc_sem.c#L137-L151) reads and writes through [`invfo_rdwr`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/sys/kern/kern_descrip.c#L4029-L4034) and is not seekable: - `read`, `write`, `readv`, `writev` and their `sceKernel` forms fail with `EOPNOTSUPP`; a zero-length read returns 0 first, as [`dofileread`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/sys/kern/sys_generic.c#L367-L371) finishes it before the file's read, while a zero-length write fails. - `lseek`, `pread`, `pwrite`, `preadv`, `pwritev` and their `sceKernel` forms fail with `ESPIPE`, before the `whence` and offset checks, as [`kern_lseek`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/sys/kern/vfs_syscalls.c#L1714-L1728) answers `ESPIPE` before `fo_seek` sees `whence`. `lseek` no longer checks `whence` first for a ksem id; a kqueue, a socket or a pipe still gets `EINVAL` there for a bad `whence`, as before. - A null buffer no longer turns a read or write into `EFAULT`, as `invfo_rdwr` touches no buffer. #24486, now merged, does the same for a kqueue on the same line. - These answers sit beside the existing kqueue ones, which use the same `invfo_rdwr`. - `IsKsemDescriptor`, which this uses, is replaced by `DuplicateKsemDescriptor` in open #22191. The two merge without a textual conflict, but whichever lands second needs a rebase that keeps a ksem predicate, or the build breaks. I will rebase this as soon as #22191 lands. - Tests: `Transfers` in `GuestKernelSysKsem.cpp` calls every POSIX and `sceKernel` read, write and seek entry point, including a bad `whence`, zero-length `pread` and `pwrite`, `preadv` with count 0 and `pwritev` with a zero-length vector; the semaphore's value is unchanged afterwards. - Debt: no fragment. The ksem entry never listed these calls. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Linux (Debian 13, GCC 14.2.0, Release). Head `f78c18f92a`, rebased onto `main` `14e9b90825` after #24960 merged; the only conflict was `sceKernelLseek`, which #24960 wraps in `File::RunKernelFileCall`. The runs after the first two bullets are from earlier heads. - At `f78c18f92a`, with #24488 on top: `ctest -R '^guest_(kernel_sys_ksem|kqueue|kqueue_cleared_race)$'`: 3/3 passed. This head adds `sceKernelWritev`, `sceKernelPwrite` and `sceKernelPreadv` calls to `Transfers`. - At `dc5a8ef290`, merged with my eight other updated branches onto `main` `bd9a6c00a6`: `ctest` over the 23 tests these branches touch (`guest_kernel_ioctl_fionread`, `guest_kernel_ioctl_device_type`, `guest_kernel_fcntl*`, `guest_kernel_app_archive_*`, `guest_kernel_sys_ksem`, `guest_kqueue`, `guest_equeue_events`, `guest_socket_events`, `guest_system_configuration`, `guest_socket_pair`, `guest_recvmsg_memory`, `guest_kernel_sys_cpuset`, `np_uds_events`, `guest_np_uds_*` and `guest_np_trophy_*`): all pass. With the `lseek` change reverted, `guest_kernel_sys_ksem` fails at the new `lseek(d, 0, 7)` check. - Negative control: with only the test change, on `main` `84e16538d4`, `guest_kernel_sys_ksem` fails at the first new `read` check. - On `f00eb79b35`, `ctest` over `guest_kernel_sys_ksem`, `guest_kqueue`, `guest_kernel_sys`, `guest_filesystem`, `guest_file_vector`, `guest_kernel_sys_aio`, `guest_equeue_events`, `guest_kernel_fcntl`, `guest_kernel_ioctl_fionread` and `guest_kernel_ioctl_device_type`: all 10 pass. - Full `ctest` (6393 tests, `-j 12`) on this branch and my other eleven branches of this round, merged onto `main` `84e16538d4`: 6378 passed. The 15 failures also fail on `main` in this environment: - nine need a `.git` directory, network access or a passwd entry for the user: `conventions_git_errors`, `test_script_registration`, `web_library_assets`, `title_run`, `title_run_identity`, `guest_kernel_sys_login`, `guest_net_ctl`, `guest_getlogin` and `guest_getlogin_no_session`; - five `agc_driver` GPU cases fail the same way on `main`: `prepared_shaders` with its `indirect`, `uncached` and `debug` forms, and `storage_file_write`; - `agc_driver_image_table_packed_guards` is unstable on `main` as well (2 of 10 runs passed on its own on `main` `3f4693be43`). - `python3 tools/check_conventions.py --base origin/main`: passed. - `python3 tools/pr_overlap.py --branch fix/libkernel-ksem-read-write-seek`: #22191 adds a call in the same place of `GuestKernelSysKsem.cpp`'s `main` (line 300), so whichever lands second needs a rebase, which also covers the `IsKsemDescriptor` point above; could not compare #6936, #7121, #7447, #9293, #9297, #9302, #12682, #12688, #12700, #12965 and #15037, which conflict with `main`; none of them changes the ksem or kqueue checks this touches. - `python3 tools/pr_overlap.py --branch` on the stack at `ad4b485923` (#24488 on this head): only #22191 (the test `main` line above) is listed as conflicting. - Not tested on Windows or macOS. No title. ### 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) and the licence notice of code adapted from upstream (see AGENTS.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
PrivacyOnion commented 2026-11-20 17:56:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T17:56:08Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against f00eb79b35:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_kernel_sys_ksem_tests, guest_kqueue_tests built cleanly.
  • CTest (guest_kernel_sys_ksem, guest_kqueue, guest_kqueue_cleared_race):
    1/3 Test #5877: guest_kqueue .....................   Passed    5.83 sec
    2/3 Test #1036: guest_kernel_sys_ksem ............   Passed    5.42 sec
    3/3 Test #5878: guest_kqueue_cleared_race ........   Passed   21.58 sec
    100% tests passed, 0 tests failed out of 3
    
  • Negative control: with core/libs/prx/libkernel/File/src/Open.cpp, core/libs/prx/libkernel/File/src/Stdio.cpp reverted to main and the new tests kept, the suite fails:
    1/3 Test #5877: guest_kqueue .....................Subprocess aborted***Exception:   2.60 sec
    2/3 Test #1036: guest_kernel_sys_ksem ............***Failed    5.49 sec
    3/3 Test #5878: guest_kqueue_cleared_race ........***Timeout  30.25 sec
    0% tests passed, 3 tests failed out of 3
    
    Restoring the change makes it pass again.
  • Code reading:
    • Verified Open.cpp: sceKernelRead, sceKernelWrite, and sceKernelLseek correctly check IsKsemDescriptor(d) and return nbytes == 0 ? 0 : SCE_KERNEL_ERROR_EOPNOTSUPP, SCE_KERNEL_ERROR_EOPNOTSUPP, and SCE_KERNEL_ERROR_ESPIPE respectively, matching FreeBSD ksem_ops / invfo_rdwr semantics.
    • Verified Stdio.cpp: PositionedArgumentError, TransferArgumentError, TransferIovecs, sceKernelReadv, and sceKernelWritev handle IsKsemDescriptor(d) identical to kqueue descriptors, returning GUEST_ESPIPE on positioned ops, bypassing buffer null checks, and returning KqueueIovecsResult.
    • Verified null buffer handling in TransferArgumentError and TransferIovecs: invfo_rdwr does not touch user buffers, correctly avoiding EFAULT when read/write or readv/writev are called on ksem descriptors with null buffers.
    • Verified GuestKernelSysKsem.cpp and GuestKqueue.cpp unit test additions comprehensively exercise read, write, lseek, pread, pwrite, readv, writev, preadv, pwritev, sceKernel* variants, null buffers, and zero lengths without side effects on semaphore state.
    • Verified AGENTS.md compliance: conventional commit title used, no forbidden comments added, clean git diff, and clean pass on mechanical gates.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5997140938 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24487#pullrequestreview-5997140938). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-20T17:56:08Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `f00eb79b35`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_kernel_sys_ksem_tests`, `guest_kqueue_tests` built cleanly. - **CTest** (`guest_kernel_sys_ksem`, `guest_kqueue`, `guest_kqueue_cleared_race`): ``` 1/3 Test #5877: guest_kqueue ..................... Passed 5.83 sec 2/3 Test #1036: guest_kernel_sys_ksem ............ Passed 5.42 sec 3/3 Test #5878: guest_kqueue_cleared_race ........ Passed 21.58 sec 100% tests passed, 0 tests failed out of 3 ``` - **Negative control**: with `core/libs/prx/libkernel/File/src/Open.cpp`, `core/libs/prx/libkernel/File/src/Stdio.cpp` reverted to `main` and the new tests kept, the suite fails: ``` 1/3 Test #5877: guest_kqueue .....................Subprocess aborted***Exception: 2.60 sec 2/3 Test #1036: guest_kernel_sys_ksem ............***Failed 5.49 sec 3/3 Test #5878: guest_kqueue_cleared_race ........***Timeout 30.25 sec 0% tests passed, 3 tests failed out of 3 ``` Restoring the change makes it pass again. - **Code reading**: - Verified Open.cpp: sceKernelRead, sceKernelWrite, and sceKernelLseek correctly check IsKsemDescriptor(d) and return nbytes == 0 ? 0 : SCE_KERNEL_ERROR_EOPNOTSUPP, SCE_KERNEL_ERROR_EOPNOTSUPP, and SCE_KERNEL_ERROR_ESPIPE respectively, matching FreeBSD ksem_ops / invfo_rdwr semantics. - Verified Stdio.cpp: PositionedArgumentError, TransferArgumentError, TransferIovecs, sceKernelReadv, and sceKernelWritev handle IsKsemDescriptor(d) identical to kqueue descriptors, returning GUEST_ESPIPE on positioned ops, bypassing buffer null checks, and returning KqueueIovecsResult. - Verified null buffer handling in TransferArgumentError and TransferIovecs: invfo_rdwr does not touch user buffers, correctly avoiding EFAULT when read/write or readv/writev are called on ksem descriptors with null buffers. - Verified GuestKernelSysKsem.cpp and GuestKqueue.cpp unit test additions comprehensively exercise read, write, lseek, pread, pwrite, readv, writev, preadv, pwritev, sceKernel* variants, null buffers, and zero lengths without side effects on semaphore state. - Verified AGENTS.md compliance: conventional commit title used, no forbidden comments added, clean git diff, and clean pass on mechanical gates. Looks Good To Me
MarcZX10 commented 2026-11-21 05:38:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T05:38:26Z.

Review: COMMENTED


Reviewed — comments

The review covered all four changed files at head f00eb79b35838a3e76f7870c9f5a8bfee207e1e5; one test gap remains, so a formal approval is not justified.

What I ran

Read the prepared diff and all changed files at the pinned head through repo_read.py. No commands or tests were run during this review.

Results

Check Result Note
Changed-file review passed All four changed files read
Tests not run Author-reported results only
Negative control not run Not independently reproduced

Findings

Blocking

None.

Non-blocking

  • The new Transfers test exercises preadv/pwritev with one nonempty vector, but does not test zero-vector or zero-length positioned I/O. These calls go through PositionedArgumentError before any transfer and should return ESPIPE for a ksem descriptor regardless of offset or vector length. Add cases for zero-length pread/pwrite and zero-count preadv/pwritev to pin that behavior. Changed line: core/libs/tests/GuestKernelSysKsem.cpp:317.

Not verified

  • No tests were run independently; CI, the author-reported test results, and the negative control were not verified.
  • Windows, macOS, and physical-console behavior were not tested.
  • files.json was not available in the prepared review bundle; the manifest lists four changed files, and all four full file texts were read.

To get this to a good state

Nothing is required. Optional: add zero-length and zero-count positioned-I/O cases to Transfers.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6003203997 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24487#pullrequestreview-6003203997). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T05:38:26Z. **Review:** COMMENTED --- # Reviewed — comments The review covered all four changed files at head `f00eb79b35838a3e76f7870c9f5a8bfee207e1e5`; one test gap remains, so a formal approval is not justified. ## What I ran Read the prepared diff and all changed files at the pinned head through `repo_read.py`. No commands or tests were run during this review. ## Results | Check | Result | Note | |---|---|---| | Changed-file review | passed | All four changed files read | | Tests | not run | Author-reported results only | | Negative control | not run | Not independently reproduced | ## Findings ### Blocking None. ### Non-blocking - The new `Transfers` test exercises `preadv`/`pwritev` with one nonempty vector, but does not test zero-vector or zero-length positioned I/O. These calls go through `PositionedArgumentError` before any transfer and should return `ESPIPE` for a ksem descriptor regardless of offset or vector length. Add cases for zero-length `pread`/`pwrite` and zero-count `preadv`/`pwritev` to pin that behavior. Changed line: `core/libs/tests/GuestKernelSysKsem.cpp:317`. ## Not verified - No tests were run independently; CI, the author-reported test results, and the negative control were not verified. - Windows, macOS, and physical-console behavior were not tested. - `files.json` was not available in the prepared review bundle; the manifest lists four changed files, and all four full file texts were read. ## To get this to a good state Nothing is required. Optional: add zero-length and zero-count positioned-I/O cases to `Transfers`.
MarcZX10 commented 2026-11-25 09:29:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T09:29:09Z.

Review: COMMENTED


Reviewed — no blocking findings

The descriptor-specific transfer and seek handling matches the intended ksem behavior in the inspected paths; I did not run checks on this head, so a formal approval is not justified.

What I ran

Reviewed head dc5a8ef290c7f4b2571611d8ffb5a7a0e281b69e using repo_read.py to inspect the prepared review packet and targeted source ranges. No tests or build commands were run. The author reports test results in the PR description; these were not independently verified.

Results

Check Result Note
Changed code review passed Inspected all three changed files
Automated checks not run Author-reported results only
Negative control not run Author reports a negative control

Negative control

Not run in this review. The author reports that the new test failed on the prior main revision.

Findings

Blocking

None.

Non-blocking

  • GuestKernelSysKsem.cpp does not directly exercise sceKernelWritev, sceKernelPreadv, or sceKernelPwrite; adding those cases would cover the remaining public entry points.

Sources

  • Open.cpp: the read, write, and seek branches check ksem descriptors before host buffer handling or whence validation.
  • Stdio.cpp: positioned transfers return ESPIPE for ksem descriptors; vector transfers reuse the kqueue result behavior.
  • GuestKernelSysKsem.cpp: added tests cover POSIX and sceKernel transfer/seek behavior, including zero-length operations.

Not verified

  • Build and test results on this head, including the author-reported Debian 13 runs.
  • Windows, macOS, and physical-console behavior.
  • files.json was not available through the review reader. The manifest lists three changed files, all marked included; I inspected changed code in Open.cpp, Stdio.cpp, and GuestKernelSysKsem.cpp. No excluded changed file was listed in the manifest.

To get this to a good state

Nothing is required. Optional: add direct coverage for the remaining public entry points noted above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6054966463 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24487#pullrequestreview-6054966463). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T09:29:09Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The descriptor-specific transfer and seek handling matches the intended ksem behavior in the inspected paths; I did not run checks on this head, so a formal approval is not justified. ## What I ran Reviewed head `dc5a8ef290c7f4b2571611d8ffb5a7a0e281b69e` using `repo_read.py` to inspect the prepared review packet and targeted source ranges. No tests or build commands were run. The author reports test results in the PR description; these were not independently verified. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | Inspected all three changed files | | Automated checks | not run | Author-reported results only | | Negative control | not run | Author reports a negative control | ## Negative control Not run in this review. The author reports that the new test failed on the prior main revision. ## Findings ### Blocking None. ### Non-blocking - `GuestKernelSysKsem.cpp` does not directly exercise `sceKernelWritev`, `sceKernelPreadv`, or `sceKernelPwrite`; adding those cases would cover the remaining public entry points. ## Sources - `Open.cpp`: the read, write, and seek branches check ksem descriptors before host buffer handling or `whence` validation. - `Stdio.cpp`: positioned transfers return `ESPIPE` for ksem descriptors; vector transfers reuse the kqueue result behavior. - `GuestKernelSysKsem.cpp`: added tests cover POSIX and `sceKernel` transfer/seek behavior, including zero-length operations. ## Not verified - Build and test results on this head, including the author-reported Debian 13 runs. - Windows, macOS, and physical-console behavior. - `files.json` was not available through the review reader. The manifest lists three changed files, all marked included; I inspected changed code in `Open.cpp`, `Stdio.cpp`, and `GuestKernelSysKsem.cpp`. No excluded changed file was listed in the manifest. ## To get this to a good state Nothing is required. Optional: add direct coverage for the remaining public entry points noted above.
MarcZX10 commented 2026-11-25 11:38:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T11:38:22Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the implementation handles the ksem transfer and seek cases described, and the inspected tests cover the stated edge cases.

What I ran

Reviewed head f78c18f92a4bc99249a5536d60946e6e7271d4c9 using the prepared diff and pinned repository reader. No commands or tests were run.

Results

Check Result Note
Changed-code review passed Three changed files inspected
Tests not run Author-reported results are not independently verified

Findings

Blocking

None.

Non-blocking

None.

Not verified

No tests were run. The author reports focused tests passed, but those results were not independently confirmed. The excluded-file manifest was unavailable, so excluded files are not verified. Read: Open.cpp, Stdio.cpp, GuestKernelSysKsem.cpp, and Ksem.hpp. All three changed files marked included in manifest.json were read, though only targeted ranges in the production files. No excluded files were read.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6056912166 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24487#pullrequestreview-6056912166). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T11:38:22Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the implementation handles the ksem transfer and seek cases described, and the inspected tests cover the stated edge cases. ## What I ran Reviewed head `f78c18f92a4bc99249a5536d60946e6e7271d4c9` using the prepared diff and pinned repository reader. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Changed-code review | passed | Three changed files inspected | | Tests | not run | Author-reported results are not independently verified | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified No tests were run. The author reports focused tests passed, but those results were not independently confirmed. The excluded-file manifest was unavailable, so excluded files are not verified. Read: `Open.cpp`, `Stdio.cpp`, `GuestKernelSysKsem.cpp`, and `Ksem.hpp`. All three changed files marked included in `manifest.json` were read, though only targeted ranges in the production files. No excluded files were read. ## 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!24487
No description provided.