fix(libkernel): handle fcntl and FIONREAD on a host socket descriptor #7403

Merged
milescoviello merged 2 commits from upstream-pr/7403 into main 2026-10-19 19:30:51 +00:00
milescoviello commented 2026-10-18 04:46:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-18T04:46:04Z.


What

On Linux and macOS, fcntl and ioctl threw for a host socket that is not a guest socket:

fcntl: descriptor N is neither a file, a directory, a pipe nor a character device

A standard descriptor is such a socket when a service manager connects it to its journal, or when the process starts with a socket as stdin. That makes guest_kernel_fcntl abort in its StandardInputFlags case. Here the full ctest -j8 run on main 1e2d9b369b failed that test 3 runs out of 3, while the test passes on its own:

[libc] unhandled exception 'St13runtime_error' ...
  what():  fcntl: descriptor 0 is neither a file, a directory, a pipe nor a character device

Started with a socket as stdin from Python's subprocess, the same test binary aborts the same way every time; with /dev/null as stdin it passes.

A socket is now its own descriptor kind in DescriptorControl.cpp:

  • Its status and close-on-exec flags go through the host, as for a pipe end.
  • FIONREAD asks the host.
  • Record locks and read-ahead hints fail with EBADF, as for a pipe. FreeBSD's kern_fcntl returns EBADF for these on a descriptor without a vnode.
  • O_ASYNC still throws, as on a pipe.

Guest sockets keep their own path, and Windows classification is unchanged. The fcntl technical debt entry describes the new case.

Tested

Ubuntu 24.04, GCC 13.3, Release.

  • guest_kernel_fcntl gains HostSocketFlags (not on Windows). It runs on a host socketpair:

    • F_GETFL reports O_RDWR;
    • F_SETFL with O_NONBLOCK reaches the host socket;
    • F_SETFD and F_GETFD round-trip;
    • FIONREAD reports the 3 queued bytes;
    • F_SETLK and F_RDAHEAD fail with EBADF;
    • O_ASYNC throws as on a pipe.

    Results:

    • With main's DescriptorControl.cpp the test aborts with fcntl: descriptor 5 is neither a file, a directory, a pipe nor a character device. With this PR it passes 3 of 3.
    • With a socket as stdin it now passes too.
  • After rebasing onto main 4566cc3377: the 419 guest_* tests pass. Before that rebase, the full suite passed 1437 of 1437 under ctest -j8, including guest_kernel_fcntl.

  • Windows 11 (MinGW GCC 15.2) and Ubuntu 24.04 (GCC 13.3), this PR merged onto main 9f25d0bf5 (run by @wachi35676). On Windows it builds and the socket and fcntl tests pass 38/38; the change and its test are for Linux and macOS only. On Linux, HostSocketFlags aborts with main's DescriptorControl.cpp and passes with this PR. guest_kernel_fcntl_tests started with a socketpair as stdin aborts on main and exits 0 with this PR.

  • From the same run: for a datagram socket, Linux's FIONREAD counts only the next datagram, and FreeBSD's soo_ioctl counts every buffered byte. The fcntl entry in docs/dev/debt/libkernel.md now says so (91a9e5608e). The code still passes the host's count through.

  • tools/check_conventions.py --base upstream/main passes.

  • #7437 (guest sockets, F_DUPFD and F_DUP2FD on the libSceNet path) rewrites the same fcntl line in docs/dev/debt/libkernel.md. The code doesn't overlap: this PR only changes DescriptorControl.cpp for host sockets. Whichever PR lands second needs that sentence merged, and I'll rebase this one if it's second.

  • @DavidAmsellem reproduced it and confirmed the fix on Linux Mint 22.3, AMD RX 7900 XT (RADV, Mesa 25.2.8). On plain main, guest_kernel_fcntl fails under ctest -j8 in 4 of 4 runs with the reported message, and starting the test with a socket-pair end as stdin aborts every time. With this PR (91a9e5608 on 0bc3003f8), that start passes 3 of 3 and full ctest -j8 passes 1478 of 1480. The two failures happen on main too.

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: AMD Radeon RX 7900 XT, RADV Mesa 25.2.8 (by @DavidAmsellem)
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4906440184 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7403). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-18T04:46:04Z. --- ### What On Linux and macOS, `fcntl` and `ioctl` threw for a host socket that is not a guest socket: ``` fcntl: descriptor N is neither a file, a directory, a pipe nor a character device ``` A standard descriptor is such a socket when a service manager connects it to its journal, or when the process starts with a socket as stdin. That makes `guest_kernel_fcntl` abort in its `StandardInputFlags` case. Here the full `ctest -j8` run on `main` 1e2d9b369b failed that test 3 runs out of 3, while the test passes on its own: ``` [libc] unhandled exception 'St13runtime_error' ... what(): fcntl: descriptor 0 is neither a file, a directory, a pipe nor a character device ``` Started with a socket as stdin from Python's `subprocess`, the same test binary aborts the same way every time; with `/dev/null` as stdin it passes. A socket is now its own descriptor kind in `DescriptorControl.cpp`: - Its status and close-on-exec flags go through the host, as for a pipe end. - `FIONREAD` asks the host. - Record locks and read-ahead hints fail with `EBADF`, as for a pipe. FreeBSD's `kern_fcntl` returns `EBADF` for these on a descriptor without a vnode. - `O_ASYNC` still throws, as on a pipe. Guest sockets keep their own path, and Windows classification is unchanged. The `fcntl` technical debt entry describes the new case. ### Tested Ubuntu 24.04, GCC 13.3, Release. - `guest_kernel_fcntl` gains `HostSocketFlags` (not on Windows). It runs on a host `socketpair`: - `F_GETFL` reports `O_RDWR`; - `F_SETFL` with `O_NONBLOCK` reaches the host socket; - `F_SETFD` and `F_GETFD` round-trip; - `FIONREAD` reports the 3 queued bytes; - `F_SETLK` and `F_RDAHEAD` fail with `EBADF`; - `O_ASYNC` throws as on a pipe. Results: - With `main`'s `DescriptorControl.cpp` the test aborts with `fcntl: descriptor 5 is neither a file, a directory, a pipe nor a character device`. With this PR it passes 3 of 3. - With a socket as stdin it now passes too. - After rebasing onto `main` 4566cc3377: the 419 `guest_*` tests pass. Before that rebase, the full suite passed 1437 of 1437 under `ctest -j8`, including `guest_kernel_fcntl`. - Windows 11 (MinGW GCC 15.2) and Ubuntu 24.04 (GCC 13.3), this PR merged onto `main` 9f25d0bf5 ([run by @wachi35676](https://github.com/boykopovar/AnyPS5/pull/7403#issuecomment-6249841178)). On Windows it builds and the socket and fcntl tests pass 38/38; the change and its test are for Linux and macOS only. On Linux, `HostSocketFlags` aborts with `main`'s `DescriptorControl.cpp` and passes with this PR. `guest_kernel_fcntl_tests` started with a socketpair as stdin aborts on `main` and exits 0 with this PR. - From the same run: for a datagram socket, Linux's `FIONREAD` counts only the next datagram, and FreeBSD's `soo_ioctl` counts every buffered byte. The fcntl entry in `docs/dev/debt/libkernel.md` now says so (91a9e5608e). The code still passes the host's count through. - `tools/check_conventions.py --base upstream/main` passes. - #7437 (guest sockets, `F_DUPFD` and `F_DUP2FD` on the libSceNet path) rewrites the same `fcntl` line in `docs/dev/debt/libkernel.md`. The code doesn't overlap: this PR only changes `DescriptorControl.cpp` for host sockets. Whichever PR lands second needs that sentence merged, and I'll rebase this one if it's second. - @DavidAmsellem [reproduced it and confirmed the fix](https://github.com/boykopovar/AnyPS5/pull/7403#issuecomment-6256360874) on Linux Mint 22.3, AMD RX 7900 XT (RADV, Mesa 25.2.8). On plain `main`, `guest_kernel_fcntl` fails under `ctest -j8` in 4 of 4 runs with the reported message, and starting the test with a socket-pair end as stdin aborts every time. With this PR (91a9e5608 on 0bc3003f8), that start passes 3 of 3 and full `ctest -j8` passes 1478 of 1480. The two failures happen on `main` too. ### 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: AMD Radeon RX 7900 XT, RADV Mesa 25.2.8 (by @DavidAmsellem) - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-18 04:56:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T04:56:16Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 7437 docs/dev/debt/libkernel.md L199-200

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 docs/dev/debt/libkernel.md
PR 6044 core/libs/tests/GuestKernelFcntl.cpp
PR 6149 docs/dev/debt/libkernel.md
PR 6446 docs/dev/debt/libkernel.md
PR 6469 docs/dev/debt/libkernel.md
PR 6519 docs/dev/debt/libkernel.md
PR 6740 docs/dev/debt/libkernel.md
PR 6936 docs/dev/debt/libkernel.md
PR 6977 core/libs/tests/GuestKernelFcntl.cpp
docs/dev/debt/libkernel.md
PR 7049 docs/dev/debt/libkernel.md
PR 7075 docs/dev/debt/libkernel.md
PR 7088 docs/dev/debt/libkernel.md
PR 7105 docs/dev/debt/libkernel.md
PR 7121 core/libs/prx/libkernel/File/src/DescriptorControl.cpp
docs/dev/debt/libkernel.md
PR 7149 docs/dev/debt/libkernel.md
PR 7332 core/libs/tests/GuestKernelFcntl.cpp
docs/dev/debt/libkernel.md
PR 7509 docs/dev/debt/libkernel.md
PR 7541 docs/dev/debt/libkernel.md
PR 7554 docs/dev/debt/libkernel.md
PR 7556 docs/dev/debt/libkernel.md
PR 7605 docs/dev/debt/libkernel.md
PR 7653 docs/dev/debt/libkernel.md
PR 7937 docs/dev/debt/libkernel.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6245858679 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7403#issuecomment-6245858679). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T04:56:16Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 7437](https://www.github.com/boykopovar/AnyPS5/pull/7437) | `docs/dev/debt/libkernel.md` [L199-200](https://github.com/boykopovar/AnyPS5/blob/38de0a470b71a4d5c7366f04cd3ee7b567b64d80/docs/dev/debt/libkernel.md#L199-L200) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `docs/dev/debt/libkernel.md` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestKernelFcntl.cpp` | | [PR 6149](https://www.github.com/boykopovar/AnyPS5/pull/6149) | `docs/dev/debt/libkernel.md` | | [PR 6446](https://www.github.com/boykopovar/AnyPS5/pull/6446) | `docs/dev/debt/libkernel.md` | | [PR 6469](https://www.github.com/boykopovar/AnyPS5/pull/6469) | `docs/dev/debt/libkernel.md` | | [PR 6519](https://www.github.com/boykopovar/AnyPS5/pull/6519) | `docs/dev/debt/libkernel.md` | | [PR 6740](https://www.github.com/boykopovar/AnyPS5/pull/6740) | `docs/dev/debt/libkernel.md` | | [PR 6936](https://www.github.com/boykopovar/AnyPS5/pull/6936) | `docs/dev/debt/libkernel.md` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/tests/GuestKernelFcntl.cpp`<br>`docs/dev/debt/libkernel.md` | | [PR 7049](https://www.github.com/boykopovar/AnyPS5/pull/7049) | `docs/dev/debt/libkernel.md` | | [PR 7075](https://www.github.com/boykopovar/AnyPS5/pull/7075) | `docs/dev/debt/libkernel.md` | | [PR 7088](https://www.github.com/boykopovar/AnyPS5/pull/7088) | `docs/dev/debt/libkernel.md` | | [PR 7105](https://www.github.com/boykopovar/AnyPS5/pull/7105) | `docs/dev/debt/libkernel.md` | | [PR 7121](https://www.github.com/boykopovar/AnyPS5/pull/7121) | `core/libs/prx/libkernel/File/src/DescriptorControl.cpp`<br>`docs/dev/debt/libkernel.md` | | [PR 7149](https://www.github.com/boykopovar/AnyPS5/pull/7149) | `docs/dev/debt/libkernel.md` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/tests/GuestKernelFcntl.cpp`<br>`docs/dev/debt/libkernel.md` | | [PR 7509](https://www.github.com/boykopovar/AnyPS5/pull/7509) | `docs/dev/debt/libkernel.md` | | [PR 7541](https://www.github.com/boykopovar/AnyPS5/pull/7541) | `docs/dev/debt/libkernel.md` | | [PR 7554](https://www.github.com/boykopovar/AnyPS5/pull/7554) | `docs/dev/debt/libkernel.md` | | [PR 7556](https://www.github.com/boykopovar/AnyPS5/pull/7556) | `docs/dev/debt/libkernel.md` | | [PR 7605](https://www.github.com/boykopovar/AnyPS5/pull/7605) | `docs/dev/debt/libkernel.md` | | [PR 7653](https://www.github.com/boykopovar/AnyPS5/pull/7653) | `docs/dev/debt/libkernel.md` | | [PR 7937](https://www.github.com/boykopovar/AnyPS5/pull/7937) | `docs/dev/debt/libkernel.md` |
wachi35676 commented 2026-10-18 12:20:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-18T12:20:16Z.


Also built and ran on Windows 11 (MinGW GCC 15.2) and Ubuntu 24.04 (GCC 13.3), with this PR merged onto main 9f25d0bf5.

  • Windows: it compiles and the socket/fcntl set passes 38/38. The change and its test are non-Windows by design.
  • Linux: HostSocketFlags aborts with main's DescriptorControl.cpp and passes with this PR. guest_kernel_fcntl_tests started with a socketpair as stdin aborts on main ("descriptor 0 is neither…") and exits 0 with this PR.

One small difference you may want in the debt line: FIONREAD on a host socket passes the host's answer through. For a datagram socket, Linux reports only the next datagram: an AF_UNIX SOCK_DGRAM socket with 3+5 bytes queued gives 3. FreeBSD's soo_ioctl reports everything buffered, sbavail(&so->so_rcv) = 8 (sys_socket.c:202-205).

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6249841178 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7403#issuecomment-6249841178). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-18T12:20:16Z. --- Also built and ran on Windows 11 (MinGW GCC 15.2) and Ubuntu 24.04 (GCC 13.3), with this PR merged onto `main` `9f25d0bf5`. - **Windows:** it compiles and the socket/fcntl set passes 38/38. The change and its test are non-Windows by design. - **Linux:** `HostSocketFlags` aborts with `main`'s `DescriptorControl.cpp` and passes with this PR. `guest_kernel_fcntl_tests` started with a socketpair as stdin aborts on `main` ("descriptor 0 is neither…") and exits 0 with this PR. One small difference you may want in the debt line: `FIONREAD` on a host socket passes the host's answer through. For a datagram socket, Linux reports only the next datagram: an AF_UNIX `SOCK_DGRAM` socket with 3+5 bytes queued gives 3. FreeBSD's `soo_ioctl` reports everything buffered, `sbavail(&so->so_rcv)` = 8 ([sys_socket.c:202-205](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/sys/kern/sys_socket.c#L202-L205)). AI-assisted: yes (Claude Code); results above were run on this machine.
milescoviello commented 2026-10-18 12:23:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-18T12:23:15Z.


Thanks @wachi35676 for the Windows and Linux runs, and for the datagram FIONREAD case. I added both to the description. Linux gives no direct count of every queued datagram, so the code keeps passing the host's count through, and the fcntl debt entry now records the difference (91a9e5608e, with the soo_ioctl lines you linked).

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6249869058 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7403#issuecomment-6249869058). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-18T12:23:15Z. --- Thanks @wachi35676 for the Windows and Linux runs, and for the datagram `FIONREAD` case. I added both to the description. Linux gives no direct count of every queued datagram, so the code keeps passing the host's count through, and the fcntl debt entry now records the difference (91a9e5608e, with the `soo_ioctl` lines you linked). AI-assisted: yes (Claude Code)
DavidAmsellem commented 2026-10-18 23:12:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DavidAmsellem on 2026-10-18T23:12:58Z.


Independently reproduced and confirmed fixed on another Linux machine.

  • GPU/OS: AMD Radeon RX 7900 XT (RADV NAVI31, Mesa 25.2.8), Linux Mint 22.3 (Ubuntu 24.04 base),
    kernel 7.0.0-38, GCC 13.3
  • Built 91a9e5608 merged into main 0bc3003f8, Release, BUILD_TESTING=ON

Before this PR, on plain main:

  • ctest -j8 failed guest_kernel_fcntl with Subprocess aborted in 4 runs of 4, and in 3 more
    runs of a reduced set, while the test passes when run on its own.
  • LastTest.log carries exactly the reported message:
    fcntl: descriptor 0 is neither a file, a directory, a pipe nor a character device.
  • Starting the test binary with a socketpair end as stdin aborts every time; with /dev/null, a
    regular file, a pipe, or stdin closed, it passes. That matches the StandardInputFlags case
    calling fcntl(0, F_GETFL) on whatever descriptor 0 happens to be.

With this PR:

  • The same socket-as-stdin start passes 3 runs of 3.
  • Full ctest -j8 with ANYPS5_REQUIRE_VULKAN=1: 1478 of 1480, and guest_kernel_fcntl is no
    longer among the failures. The two remaining ones are unrelated to this PR and also fail on
    main here: agc_pipeline_cache_file (#7676) and agc_driver_guest_memory_lifetime_direct
    (no read-write access to /dev/udmabuf on this machine).

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256360874 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7403#issuecomment-6256360874). Originally posted by [DavidAmsellem](https://github.com/DavidAmsellem) on 2026-10-18T23:12:58Z. --- Independently reproduced and confirmed fixed on another Linux machine. - GPU/OS: AMD Radeon RX 7900 XT (RADV NAVI31, Mesa 25.2.8), Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3 - Built `91a9e5608` merged into `main` `0bc3003f8`, Release, `BUILD_TESTING=ON` Before this PR, on plain `main`: - `ctest -j8` failed `guest_kernel_fcntl` with `Subprocess aborted` in 4 runs of 4, and in 3 more runs of a reduced set, while the test passes when run on its own. - `LastTest.log` carries exactly the reported message: `fcntl: descriptor 0 is neither a file, a directory, a pipe nor a character device`. - Starting the test binary with a `socketpair` end as stdin aborts every time; with `/dev/null`, a regular file, a pipe, or stdin closed, it passes. That matches the `StandardInputFlags` case calling `fcntl(0, F_GETFL)` on whatever descriptor 0 happens to be. With this PR: - The same socket-as-stdin start passes 3 runs of 3. - Full `ctest -j8` with `ANYPS5_REQUIRE_VULKAN=1`: 1478 of 1480, and `guest_kernel_fcntl` is no longer among the failures. The two remaining ones are unrelated to this PR and also fail on `main` here: `agc_pipeline_cache_file` (#7676) and `agc_driver_guest_memory_lifetime_direct` (no read-write access to `/dev/udmabuf` on this machine). AI-assisted (Claude Code).
milescoviello commented 2026-10-19 01:06:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-19T01:06:13Z.


Thanks @DavidAmsellem for reproducing it on AMD. The socket-as-stdin start is a clean way to show the cause. I added your runs to the description.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6257475119 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7403#issuecomment-6257475119). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-19T01:06:13Z. --- Thanks @DavidAmsellem for reproducing it on AMD. The socket-as-stdin start is a clean way to show the cause. I added your runs to the description. AI-assisted: yes (Claude Code)
adriadam10 commented 2026-10-19 19:31:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T19:31:33Z.


Checked the diff against FreeBSD's kern_fcntl/soo_ioctl behaviour cited in the debt entry: Classify no longer throws for a host socket, every pipe-only branch on the non-Windows path (status flags, record lock, read-ahead, O_ASYNC, FIONREAD) now covers it, guest sockets and Windows are untouched. HostSocketFlags pins the values and throws on main; independent runs by @wachi35676 and @DavidAmsellem confirm it. The libkernel.md line only collides with #7437 by adjacency. Merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6275548427 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7403#issuecomment-6275548427). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T19:31:33Z. --- Checked the diff against FreeBSD's `kern_fcntl`/`soo_ioctl` behaviour cited in the debt entry: `Classify` no longer throws for a host socket, every pipe-only branch on the non-Windows path (status flags, record lock, read-ahead, `O_ASYNC`, `FIONREAD`) now covers it, guest sockets and Windows are untouched. `HostSocketFlags` pins the values and throws on `main`; independent runs by @wachi35676 and @DavidAmsellem confirm it. The `libkernel.md` line only collides with #7437 by adjacency. Merged.
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!7403
No description provided.