feat(libkernel): always fire a socket read knote with NOTE_LOWAT below 1 #14832

Merged
kallmek3nny merged 2 commits from upstream-pr/14832 into main 2026-11-06 21:38:12 +00:00
kallmek3nny commented 2026-11-01 19:15:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kallmek3nny on 2026-11-01T19:15:33Z.


What

A socket EVFILT_READ knote with NOTE_LOWAT and a mark below 1 threw NotImplemented_nid_no_patch. It now follows FreeBSD 11.4. filt_soread sets kn_data = sbavail(&so->so_rcv) - so->so_rcv.sb_ctl and, with NOTE_LOWAT, returns kn_data >= kn_sdata. sbavail returns a u_int (sockbuf.h), so the difference is unsigned and kn_data, an intptr_t (event.h), is never negative. A mark of 0 or below is therefore always met:

  • A level-triggered knote is reported at every kevent call, with data set to the queued bytes: 0 on an empty socket, without EV_EOF.
  • An EV_CLEAR knote is reported once when it is added and again after new data arrives, because kqueue_scan dequeues an EV_CLEAR knote after reporting it.
  • EV_ADD on an existing knote replaces the mark, as kqueue_register copies kev->data into kn_sdata for descriptor filters and then calls f_event. A drained socket re-added with -1 is reported (data 0); re-added with 1 it is not.
  • A listening socket ignores the mark: soo_kqfilter gives it filt_solisten, which has no NOTE_LOWAT handling.
  • An EVFILT_WRITE mark below 1 still throws. filt_sowrite compares sbspace, which can be negative, and returns 0 on an unconnected socket whose protocol requires a connection, so a write mark below 1 is not always met.

The kevent measurements entry in docs/dev/debt/libkernel.md (payload processes on a PS5, firmware 12.70) recorded the level-triggered stream-socket case as still throwing here: a mark of 0 on an empty Unix-domain stream socket gave a read event at once (data 0), and so did re-adding that knote with -1 once the socket was drained. This PR implements that behaviour and removes the clause from that entry (line 172). In the kevent entry (line 167), "Marks below 1 ... throw" now says a read mark below 1 is always met except on a listening socket, and a write mark below 1 throws. The EV_CLEAR and listening-socket cases are not measured on a PS5.

Code: DescriptorLowWater in Equeue/src/Kqueue.cpp throws for a mark below 1 only on EVFILT_WRITE. The new LowWaterAlwaysMet sets KernelEqueueEvent::lowWaterAlwaysMet when a knote is added and when EV_ADD changes an existing one. The level-triggered poll in Equeue/Equeue.cpp and PollEdge in Kqueue.cpp report a socket that the host does not report as readable when that flag is set and the socket is not listening, with data 0 and no EOF.

Tests in core/libs/tests/GuestKqueue.cpp:

  • LowWaterMarks: a mark of 0 on a stream socket with 4 queued bytes (data 4); a mark of 8 there (no event). On an idle stream socketpair: a mark of 0 (event, data 0, no EV_EOF), then 3 bytes sent (data 3), then a re-add with -1 after draining (data 0) and with 1 (no event).
  • EdgeTriggeredSocketRead: an EV_CLEAR knote with a mark of 0 gives one event with data 0 and none on the next call, then one with data 2 after 2 bytes are sent, then none.

Overlap: no open PR implements a read mark below 1. Open-PR searches for NOTE_LOWAT, low water, lowat and filt_soread return #7088, #7121, #9843 and #10645, and all four keep the throw or don't touch it.

  • tools/pr_overlap.py reports #12741 (macOS edge watches) on debt line 167. #12741 rewrites that entry and keeps the "Marks below 1 ... throw" text, and it changes EdgeWatch.cpp, not the code here. #12741 was opened first, so the proposed order is #12741 first (Depends on: #12741, proposed to its author in a comment here). After #12741 merges, this branch is rebased onto main and keeps both edits to that line.
  • #9843 (EV_CLEAR EVFILT_WRITE marks above 1 on Linux TCP) adds RejectEdgeWriteMark next to DescriptorLowWater and in AddDescriptorKnote and ModifyKnote, and adds a write-side test in GuestKqueue.cpp. It is write-side only and changes none of the lines this PR changes, but its Kqueue.cpp hunks are next to ours and it also rewrites the same kevent debt entry, so the second to merge will likely need a rebase.
  • #10645 changes the sceKernelAddReadEvent/sceKernelAddWriteEvent path in Equeue.cpp (lines 876-896 on main) and debt line 192 for sizes above 1. It does not touch the kevent read-mark-below-1 throw.
  • pr_overlap could not compare 40 PRs that conflict with main. I searched each of their diffs for added or removed lines naming NOTE_LOWAT, low water, lowWater, below 1 or filt_soread; for #5021, where gh pr diff failed, I searched its per-file patches from the GitHub API. Only #7088 and #9843 match, as above. #7088 makes regular files ignore NOTE_LOWAT and keeps "marks below 1 ... throw" in its rewrite of the debt entry. #7121, #9293, #9297 and #9302 share Equeue.hpp, Equeue.cpp, Kqueue.cpp or GuestKqueue.cpp but change none of the code lines this PR changes and no low-water text.

Tested

Windows 11 Home 10.0.26300.9711, Git Bash, WinLibs gcc/g++, Ninja, Release. No title or homebrew; only the guest kqueue and public header tests were run.

  • Full build of this worktree at e450145140, before the branch was cut: git submodule update --init --recursive --jobs 8, cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DBUILD_TESTING=ON -DPython3_EXECUTABLE=C:/Python314/python.exe, cmake --build build --parallel 4: exit 0.
  • On this branch (base f2d874c1fd), after the last edit: cmake --build build --target guest_kqueue_tests --parallel 4 rebuilt 11 libkernel objects, among them Equeue.cpp and Kqueue.cpp, and GuestKqueue.cpp, and relinked libkernel.prx and guest_kqueue_tests.exe: exit 0. ctest --test-dir build -R '^guest_kqueue$' --no-tests=error --output-on-failure --timeout 120: 1/1 passed (5.55 s).
  • After the commit f0a712175f: ctest --test-dir build -R '^guest_kqueue|public_headers' --no-tests=error --output-on-failure --timeout 120: 67/67 passed (public_headers, public_headers_compile_0 to _63, guest_kqueue, guest_kqueue_cleared_race).
  • python tools/check_conventions.py --base origin/main: exit 0, 0 errors and 2 debt-length warnings for docs/dev/debt/libkernel.md. Line 167 is 3622 characters (3537 on main) and line 172 is 4159 characters (4336 on main); both were already over 1000 characters on main.
  • python tools/pr_overlap.py --branch feat/libkernel-kevent-lowat-below-one: exit 2. It probed 2023 open PRs and fails closed when it cannot compare every one. The manual comparison is under What.
  • After b15b896411, which removes the Throws assertion for an EVFILT_WRITE mark of 0 from LowWaterMarks (the write path still throws in Kqueue.cpp, and no test pins it): cmake --build build --target guest_kqueue_tests --parallel 4: exit 0. ctest --test-dir build -R '^guest_kqueue' --output-on-failure: 2/2 passed (guest_kqueue, guest_kqueue_cleared_race). tools/check_conventions.py: exit 0, 0 errors and the same 2 debt-length warnings.

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: #12741
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5110667516 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14832). Originally posted by [kallmek3nny](https://github.com/kallmek3nny) on 2026-11-01T19:15:33Z. --- ### What A socket `EVFILT_READ` knote with `NOTE_LOWAT` and a mark below 1 threw `NotImplemented_nid_no_patch`. It now follows FreeBSD 11.4. [`filt_soread`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/sys/kern/uipc_socket.c) sets `kn_data = sbavail(&so->so_rcv) - so->so_rcv.sb_ctl` and, with `NOTE_LOWAT`, returns `kn_data >= kn_sdata`. `sbavail` returns a `u_int` ([`sockbuf.h`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/sys/sys/sockbuf.h)), so the difference is unsigned and `kn_data`, an `intptr_t` ([`event.h`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/sys/sys/event.h)), is never negative. A mark of 0 or below is therefore always met: - A level-triggered knote is reported at every `kevent` call, with `data` set to the queued bytes: 0 on an empty socket, without `EV_EOF`. - An `EV_CLEAR` knote is reported once when it is added and again after new data arrives, because `kqueue_scan` dequeues an `EV_CLEAR` knote after reporting it. - `EV_ADD` on an existing knote replaces the mark, as [`kqueue_register`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/sys/kern/kern_event.c) copies `kev->data` into `kn_sdata` for descriptor filters and then calls `f_event`. A drained socket re-added with -1 is reported (`data` 0); re-added with 1 it is not. - A listening socket ignores the mark: `soo_kqfilter` gives it `filt_solisten`, which has no `NOTE_LOWAT` handling. - An `EVFILT_WRITE` mark below 1 still throws. `filt_sowrite` compares `sbspace`, which can be negative, and returns 0 on an unconnected socket whose protocol requires a connection, so a write mark below 1 is not always met. The kevent measurements entry in `docs/dev/debt/libkernel.md` (payload processes on a PS5, firmware 12.70) recorded the level-triggered stream-socket case as still throwing here: a mark of 0 on an empty Unix-domain stream socket gave a read event at once (`data` 0), and so did re-adding that knote with -1 once the socket was drained. This PR implements that behaviour and removes the clause from that entry (line 172). In the kevent entry (line 167), "Marks below 1 ... throw" now says a read mark below 1 is always met except on a listening socket, and a write mark below 1 throws. The `EV_CLEAR` and listening-socket cases are not measured on a PS5. Code: `DescriptorLowWater` in `Equeue/src/Kqueue.cpp` throws for a mark below 1 only on `EVFILT_WRITE`. The new `LowWaterAlwaysMet` sets `KernelEqueueEvent::lowWaterAlwaysMet` when a knote is added and when `EV_ADD` changes an existing one. The level-triggered poll in `Equeue/Equeue.cpp` and `PollEdge` in `Kqueue.cpp` report a socket that the host does not report as readable when that flag is set and the socket is not listening, with `data` 0 and no EOF. Tests in `core/libs/tests/GuestKqueue.cpp`: - `LowWaterMarks`: a mark of 0 on a stream socket with 4 queued bytes (`data` 4); a mark of 8 there (no event). On an idle stream socketpair: a mark of 0 (event, `data` 0, no `EV_EOF`), then 3 bytes sent (`data` 3), then a re-add with -1 after draining (`data` 0) and with 1 (no event). - `EdgeTriggeredSocketRead`: an `EV_CLEAR` knote with a mark of 0 gives one event with `data` 0 and none on the next call, then one with `data` 2 after 2 bytes are sent, then none. Overlap: no open PR implements a read mark below 1. Open-PR searches for `NOTE_LOWAT`, `low water`, `lowat` and `filt_soread` return #7088, #7121, #9843 and #10645, and all four keep the throw or don't touch it. - `tools/pr_overlap.py` reports #12741 (macOS edge watches) on debt line 167. #12741 rewrites that entry and keeps the "Marks below 1 ... throw" text, and it changes `EdgeWatch.cpp`, not the code here. #12741 was opened first, so the proposed order is #12741 first (`Depends on: #12741`, proposed to its author in a comment here). After #12741 merges, this branch is rebased onto `main` and keeps both edits to that line. - #9843 (EV_CLEAR EVFILT_WRITE marks above 1 on Linux TCP) adds `RejectEdgeWriteMark` next to `DescriptorLowWater` and in `AddDescriptorKnote` and `ModifyKnote`, and adds a write-side test in `GuestKqueue.cpp`. It is write-side only and changes none of the lines this PR changes, but its `Kqueue.cpp` hunks are next to ours and it also rewrites the same kevent debt entry, so the second to merge will likely need a rebase. - #10645 changes the `sceKernelAddReadEvent`/`sceKernelAddWriteEvent` path in `Equeue.cpp` (lines 876-896 on `main`) and debt line 192 for sizes above 1. It does not touch the kevent read-mark-below-1 throw. - pr_overlap could not compare 40 PRs that conflict with `main`. I searched each of their diffs for added or removed lines naming `NOTE_LOWAT`, low water, `lowWater`, `below 1` or `filt_soread`; for #5021, where `gh pr diff` failed, I searched its per-file patches from the GitHub API. Only #7088 and #9843 match, as above. #7088 makes regular files ignore `NOTE_LOWAT` and keeps "marks below 1 ... throw" in its rewrite of the debt entry. #7121, #9293, #9297 and #9302 share `Equeue.hpp`, `Equeue.cpp`, `Kqueue.cpp` or `GuestKqueue.cpp` but change none of the code lines this PR changes and no low-water text. ### 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. --> Windows 11 Home 10.0.26300.9711, Git Bash, WinLibs gcc/g++, Ninja, Release. No title or homebrew; only the guest kqueue and public header tests were run. - Full build of this worktree at `e450145140`, before the branch was cut: `git submodule update --init --recursive --jobs 8`, `cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DBUILD_TESTING=ON -DPython3_EXECUTABLE=C:/Python314/python.exe`, `cmake --build build --parallel 4`: exit 0. - On this branch (base `f2d874c1fd`), after the last edit: `cmake --build build --target guest_kqueue_tests --parallel 4` rebuilt 11 libkernel objects, among them `Equeue.cpp` and `Kqueue.cpp`, and `GuestKqueue.cpp`, and relinked `libkernel.prx` and `guest_kqueue_tests.exe`: exit 0. `ctest --test-dir build -R '^guest_kqueue$' --no-tests=error --output-on-failure --timeout 120`: 1/1 passed (5.55 s). - After the commit `f0a712175f`: `ctest --test-dir build -R '^guest_kqueue|public_headers' --no-tests=error --output-on-failure --timeout 120`: 67/67 passed (`public_headers`, `public_headers_compile_0` to `_63`, `guest_kqueue`, `guest_kqueue_cleared_race`). - `python tools/check_conventions.py --base origin/main`: exit 0, 0 errors and 2 `debt-length` warnings for `docs/dev/debt/libkernel.md`. Line 167 is 3622 characters (3537 on `main`) and line 172 is 4159 characters (4336 on `main`); both were already over 1000 characters on `main`. - `python tools/pr_overlap.py --branch feat/libkernel-kevent-lowat-below-one`: exit 2. It probed 2023 open PRs and fails closed when it cannot compare every one. The manual comparison is under What. - After `b15b896411`, which removes the `Throws` assertion for an `EVFILT_WRITE` mark of 0 from `LowWaterMarks` (the write path still throws in `Kqueue.cpp`, and no test pins it): `cmake --build build --target guest_kqueue_tests --parallel 4`: exit 0. `ctest --test-dir build -R '^guest_kqueue' --output-on-failure`: 2/2 passed (`guest_kqueue`, `guest_kqueue_cleared_race`). `tools/check_conventions.py`: exit 0, 0 errors and the same 2 `debt-length` warnings. ### 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: <!-- #PR, or none --> #12741 - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-01 19:31:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T19:31:32Z.

Review: COMMENTED


Reviewed — no blocking findings

The low-water update matches the reviewed source and reported PS5 stream-socket behavior; I found no source blocker, and approval is withheld while the label check remains pending.

What I ran

Reviewed head f0a712175fbd7448827b6be896a521d4e36b5040 against base f2d874c1fdccf781c0fa5d86619bb5dd8894b958. The stack preview is clean against current main (e0caf1360035286bd22b9f2a3030e97b880ffb28). Environment: Linux x86_64, Debian 12, Python 3.11.2, Git 2.39.5. No build or C++ tests were run locally.

git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...f0a712175fbd7448827b6be896a521d4e36b5040
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14832
python3 tools/pr_stack_check.py 14832 --repo boykopovar/AnyPS5
gh pr checks 14832 --repo boykopovar/AnyPS5
# Read all five changed files and the pinned FreeBSD references in the PR description.

Results

Check Result Note
Diff whitespace passed No whitespace errors
Conventions passed Two existing debt-length warnings
Stack merge preview passed Clean against current main
Author-reported Windows build and tests not run Read from PR description only
Hosted Windows build passed Linux and specialized jobs skipped
Hosted label check not run Pending at review time
ABI and test-quality helpers not run Missing from isolated PR snapshot
Captured command output
/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14832-f0a712175fbd/report.md
/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14832-f0a712175fbd/report.json
Conclusion: checks failed
conventions	pass	16s	https://github.com/boykopovar/AnyPS5/actions/runs/41341836824/job/124953317256
labels	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41341836892/job/124953317379
windows	pass	8m52s	https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950260026
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950261442
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950262057
relinker	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950261532
relinker-asan	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950262271
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950262292
eligibility	pass	6s	https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950221556
intake	pass	20s	https://github.com/boykopovar/AnyPS5/actions/runs/41340817453/job/124950221653
library-portability	pass	1m45s	https://github.com/boykopovar/AnyPS5/actions/runs/41340817498/job/124950220434
report	pass	50s	https://github.com/boykopovar/AnyPS5/actions/runs/41340817510/job/124950220441

Negative control

Not run locally. The PR reports the suite on Windows after the change, but no removed-fix variant was run as a negative control in this review.

Findings

Blocking

None found in the five changed files. The read-side flag is limited to open read sockets with NOTE_LOWAT below 1; edge-triggered modifications rearm the watcher, and listening sockets remain on their separate readiness path. The new tests cover level-triggered and EV_CLEAR cases.

Non-blocking

The PR reports a Windows 11 build and focused tests passing, including the added edge-triggered case; I did not rerun them. The labels check was pending, so this review does not approve the change yet.

Sources

Not verified

No local C++ build or runtime test was run. The Windows results and PS5 measurements were read from the PR description, not independently reproduced. Hosted Linux and specialized jobs were skipped, and the label check was still pending.

To get this to a good state

No source change is requested. Once the label check completes, I will refresh the exact head and required checks before deciding whether approval is appropriate.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729860561 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14832#pullrequestreview-5729860561). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T19:31:32Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The low-water update matches the reviewed source and reported PS5 stream-socket behavior; I found no source blocker, and approval is withheld while the label check remains pending. ## What I ran Reviewed head `f0a712175fbd7448827b6be896a521d4e36b5040` against base `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`. The stack preview is clean against current `main` (`e0caf1360035286bd22b9f2a3030e97b880ffb28`). Environment: Linux x86_64, Debian 12, Python 3.11.2, Git 2.39.5. No build or C++ tests were run locally. ```sh git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...f0a712175fbd7448827b6be896a521d4e36b5040 python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14832 python3 tools/pr_stack_check.py 14832 --repo boykopovar/AnyPS5 gh pr checks 14832 --repo boykopovar/AnyPS5 # Read all five changed files and the pinned FreeBSD references in the PR description. ``` ## Results | Check | Result | Note | |---|---|---| | Diff whitespace | passed | No whitespace errors | | Conventions | passed | Two existing debt-length warnings | | Stack merge preview | passed | Clean against current `main` | | Author-reported Windows build and tests | not run | Read from PR description only | | Hosted Windows build | passed | Linux and specialized jobs skipped | | Hosted label check | not run | Pending at review time | | ABI and test-quality helpers | not run | Missing from isolated PR snapshot | <details><summary>Captured command output</summary> ```text /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14832-f0a712175fbd/report.md /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14832-f0a712175fbd/report.json Conclusion: checks failed ``` ```text conventions pass 16s https://github.com/boykopovar/AnyPS5/actions/runs/41341836824/job/124953317256 labels pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41341836892/job/124953317379 windows pass 8m52s https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950260026 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950261442 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950262057 relinker skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950261532 relinker-asan skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950262271 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950262292 eligibility pass 6s https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950221556 intake pass 20s https://github.com/boykopovar/AnyPS5/actions/runs/41340817453/job/124950221653 library-portability pass 1m45s https://github.com/boykopovar/AnyPS5/actions/runs/41340817498/job/124950220434 report pass 50s https://github.com/boykopovar/AnyPS5/actions/runs/41340817510/job/124950220441 ``` </details> ## Negative control Not run locally. The PR reports the suite on Windows after the change, but no removed-fix variant was run as a negative control in this review. ## Findings ### Blocking None found in the five changed files. The read-side flag is limited to open read sockets with `NOTE_LOWAT` below 1; edge-triggered modifications rearm the watcher, and listening sockets remain on their separate readiness path. The new tests cover level-triggered and `EV_CLEAR` cases. ### Non-blocking The PR reports a Windows 11 build and focused tests passing, including the added edge-triggered case; I did not rerun them. The `labels` check was pending, so this review does not approve the change yet. ## Sources - [Low-water implementation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/f0a712175fbd7448827b6be896a521d4e36b5040/core/libs/prx/libkernel/Equeue/src/Kqueue.cpp) - [New kqueue tests at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/f0a712175fbd7448827b6be896a521d4e36b5040/core/libs/tests/GuestKqueue.cpp) - [FreeBSD 11.4 read-filter logic at commit `8c639945`](https://github.com/freebsd/freebsd-src/blob/8c639945a44588f6cfdddfb057bb5aad88735da0/sys/kern/uipc_socket.c#L3318-L3336) - [FreeBSD 11.4 socket-buffer availability type at the same commit](https://github.com/freebsd/freebsd-src/blob/8c639945a44588f6cfdddfb057bb5aad88735da0/sys/sys/sockbuf.h#L191-L197) ## Not verified No local C++ build or runtime test was run. The Windows results and PS5 measurements were read from the PR description, not independently reproduced. Hosted Linux and specialized jobs were skipped, and the label check was still pending. ## To get this to a good state No source change is requested. Once the label check completes, I will refresh the exact head and required checks before deciding whether approval is appropriate.
MarcZX10 commented 2026-11-01 19:41:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T19:41:50Z.

Review: APPROVED


Re-checked — hosted checks passed, approved

The exact head is unchanged, the pending labels check has passed, and the hosted Windows build and tests passed; my earlier full review found no blocking source issue.

What I ran

Rechecked head f0a712175fbd7448827b6be896a521d4e36b5040 against base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 using GitHub’s live PR and check state. Environment: Debian 12 x86_64; no local build or compiler run.

gh api repos/boykopovar/AnyPS5/pulls/14832 --jq '{state:.state,head:.head.sha,base:.base.sha}'
gh pr checks 14832 --repo boykopovar/AnyPS5

Results

Check Result Note
Hosted Windows build and tests passed Completed on the reviewed head.
Conventions, intake, labels, report and portability passed Hosted checks completed successfully.
Linux and specialized jobs not applicable Skipped by workflow.
Local build or C++ tests not run No local compilation in this follow-up.
Captured hosted-check output
conventions	pass	16s	https://github.com/boykopovar/AnyPS5/actions/runs/41341836824/job/124953317256
labels	pass	9s	https://github.com/boykopovar/AnyPS5/actions/runs/41341836892/job/124953317379
windows	pass	8m52s	https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950260026
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950261442
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950262057
relinker	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950261532
relinker-asan	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950262271
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950262292
eligibility	pass	6s	https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950221556
intake	pass	20s	https://github.com/boykopovar/AnyPS5/actions/runs/41340817453/job/124950221653
library-portability	pass	1m45s	https://github.com/boykopovar/AnyPS5/actions/runs/41340817498/job/124950220434
report	pass	50s	https://github.com/boykopovar/AnyPS5/actions/runs/41340817510/job/124950220441

Findings

Blocking

None found in the previously reviewed source.

Non-blocking

The source review and author-reported tests were not repeated in this CI-only follow-up.

Sources

Not verified

No local build, C++ tests, Linux/macOS test, console run or GPU behavior was performed in this follow-up. Linux and specialized hosted jobs were skipped.

To get this to a good state

No further action is needed for the reviewed head. If it changes, I will review the new head and its checks.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729894993 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14832#pullrequestreview-5729894993). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T19:41:50Z. **Review:** APPROVED --- # Re-checked — hosted checks passed, approved The exact head is unchanged, the pending labels check has passed, and the hosted Windows build and tests passed; my earlier full review found no blocking source issue. ## What I ran Rechecked head `f0a712175fbd7448827b6be896a521d4e36b5040` against base `f2d874c1fdccf781c0fa5d86619bb5dd8894b958` using GitHub’s live PR and check state. Environment: Debian 12 x86_64; no local build or compiler run. ```sh gh api repos/boykopovar/AnyPS5/pulls/14832 --jq '{state:.state,head:.head.sha,base:.base.sha}' gh pr checks 14832 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | Note | |---|---|---| | Hosted Windows build and tests | passed | Completed on the reviewed head. | | Conventions, intake, labels, report and portability | passed | Hosted checks completed successfully. | | Linux and specialized jobs | not applicable | Skipped by workflow. | | Local build or C++ tests | not run | No local compilation in this follow-up. | <details><summary>Captured hosted-check output</summary> ```text conventions pass 16s https://github.com/boykopovar/AnyPS5/actions/runs/41341836824/job/124953317256 labels pass 9s https://github.com/boykopovar/AnyPS5/actions/runs/41341836892/job/124953317379 windows pass 8m52s https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950260026 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950261442 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950262057 relinker skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950261532 relinker-asan skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950262271 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950262292 eligibility pass 6s https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950221556 intake pass 20s https://github.com/boykopovar/AnyPS5/actions/runs/41340817453/job/124950221653 library-portability pass 1m45s https://github.com/boykopovar/AnyPS5/actions/runs/41340817498/job/124950220434 report pass 50s https://github.com/boykopovar/AnyPS5/actions/runs/41340817510/job/124950220441 ``` </details> ## Findings ### Blocking None found in the previously reviewed source. ### Non-blocking The source review and author-reported tests were not repeated in this CI-only follow-up. ## Sources - [Reviewed knote behavior and tests at this exact head](https://github.com/boykopovar/AnyPS5/tree/f0a712175fbd7448827b6be896a521d4e36b5040/core/libs/prx/libkernel) - [Hosted Windows job for this head](https://github.com/boykopovar/AnyPS5/actions/runs/41340817511/job/124950260026) - [Hosted labels check for this head](https://github.com/boykopovar/AnyPS5/actions/runs/41341836892/job/124953317379) ## Not verified No local build, C++ tests, Linux/macOS test, console run or GPU behavior was performed in this follow-up. Linux and specialized hosted jobs were skipped. ## To get this to a good state No further action is needed for the reviewed head. If it changes, I will review the new head and its checks.
MarcZX10 commented 2026-11-01 19:44:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T19:44:33Z.

Review: CHANGES_REQUESTED


Re-checked — same head, changes requested

I found two review blockers that were missed in my earlier approval: the new test pins an intentionally unimplemented write case, and the reported debt-file overlap with open PR #12741 has no declared landing order.

What I ran

Re-checked head f0a712175fbd7448827b6be896a521d4e36b5040 against base f2d874c1fdccf781c0fa5d86619bb5dd8894b958; the head is unchanged. Linux x86_64; source, PR discussion and live overlap reports inspected. No build or tests were run for this corrective review.

gh api repos/boykopovar/AnyPS5/pulls/14832
gh api repos/boykopovar/AnyPS5/pulls/14832/files
gh api repos/boykopovar/AnyPS5/issues/14832/comments
gh api repos/boykopovar/AnyPS5/pulls/12741

Results

Check Result Note
Exact head and base passed Head unchanged
Test assertion failed Asserts an unimplemented path throws
Overlap coordination failed Open #12741 edits the same debt paragraph
Build and tests not run Corrective source review only

Findings

Blocking

  1. GuestKqueue.cpp asserts that EVFILT_WRITE with NOTE_LOWAT zero throws, while Kqueue.cpp deliberately leaves that behavior unimplemented through NotImplemented_nid_no_patch. This test would make a later implementation fail despite correct progress. Please remove this assertion or implement and test the write-side behavior in scope.
  2. The live overlap report confirms open PR #12741 also rewrites the docs/dev/debt/libkernel.md paragraph changed here. This PR's description acknowledges the shared line but says Depends on: none; repository contribution rules require agreeing the order with the other author and declaring that order. Please coordinate with #12741 and update the dependency/landing-order declaration accordingly.

Non-blocking

None.

Sources

Not verified

No build, test run, or console behavior was checked in this corrective pass. The earlier review's test evidence was supplied by the author, not run by me.

To get this to a good state

Remove the assertion for the intentionally unimplemented write path, and coordinate the shared debt-line landing order with #12741; I will re-check the changed head and rerun the applicable no-build checks.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729903995 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14832#pullrequestreview-5729903995). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T19:44:33Z. **Review:** CHANGES_REQUESTED --- # Re-checked — same head, changes requested I found two review blockers that were missed in my earlier approval: the new test pins an intentionally unimplemented write case, and the reported debt-file overlap with open PR #12741 has no declared landing order. ## What I ran Re-checked head `f0a712175fbd7448827b6be896a521d4e36b5040` against base `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`; the head is unchanged. Linux x86_64; source, PR discussion and live overlap reports inspected. No build or tests were run for this corrective review. ```sh gh api repos/boykopovar/AnyPS5/pulls/14832 gh api repos/boykopovar/AnyPS5/pulls/14832/files gh api repos/boykopovar/AnyPS5/issues/14832/comments gh api repos/boykopovar/AnyPS5/pulls/12741 ``` ## Results | Check | Result | Note | |---|---|---| | Exact head and base | passed | Head unchanged | | Test assertion | failed | Asserts an unimplemented path throws | | Overlap coordination | failed | Open #12741 edits the same debt paragraph | | Build and tests | not run | Corrective source review only | ## Findings ### Blocking 1. `GuestKqueue.cpp` asserts that `EVFILT_WRITE` with `NOTE_LOWAT` zero throws, while `Kqueue.cpp` deliberately leaves that behavior unimplemented through `NotImplemented_nid_no_patch`. This test would make a later implementation fail despite correct progress. Please remove this assertion or implement and test the write-side behavior in scope. 2. The live overlap report confirms open PR #12741 also rewrites the `docs/dev/debt/libkernel.md` paragraph changed here. This PR's description acknowledges the shared line but says `Depends on: none`; repository contribution rules require agreeing the order with the other author and declaring that order. Please coordinate with #12741 and update the dependency/landing-order declaration accordingly. ### Non-blocking None. ## Sources - [Write-side implementation remains explicitly unimplemented at this head](https://github.com/boykopovar/AnyPS5/blob/f0a712175fbd7448827b6be896a521d4e36b5040/core/libs/prx/libkernel/Equeue/src/Kqueue.cpp#L167-L177) - [The new test assertion](https://github.com/boykopovar/AnyPS5/blob/f0a712175fbd7448827b6be896a521d4e36b5040/core/libs/tests/GuestKqueue.cpp#L757-L780) - [Contribution rule for overlapping PRs](https://github.com/boykopovar/AnyPS5/blob/f0a712175fbd7448827b6be896a521d4e36b5040/CONTRIBUTING.md) - [Open PR #12741 changes the same debt entry](https://github.com/boykopovar/AnyPS5/pull/12741) ## Not verified No build, test run, or console behavior was checked in this corrective pass. The earlier review's test evidence was supplied by the author, not run by me. ## To get this to a good state Remove the assertion for the intentionally unimplemented write path, and coordinate the shared debt-line landing order with #12741; I will re-check the changed head and rerun the applicable no-build checks.
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!14832
No description provided.