AnyPS5/core/libs/prx/libkernel
screamm 01b7bb3e2f feat(libkernel): support ioctl on non-socket descriptors
ioctl and _ioctl answered EBADF for every descriptor outside the
libSceNet socket table. Decoded call sites: PS5MC (PPSA99420, FIONBIO x3,
FIONREAD x2, TIOCGWINSZ x3), ProsperoTV (PPSA99003, FIONBIO on a pipe
once poll on pipes is in), XPSemu (PPSA97358, 21 sites).

Following FreeBSD 11.4 kern_ioctl (sys/kern/sys_generic.c:758),
vn_ioctl (sys/kern/vfs_vnops.c:1488), pipe_ioctl (sys/kern/sys_pipe.c:1346)
and randomdev_ioctl (sys/dev/random/randomdev.c:301), release/11.4.0
8c639945: FIONBIO sets or clears O_NONBLOCK through the same status
flags as fcntl F_SETFL (EFAULT for a null argument before EBADF);
FIONREAD reports the size past the offset of a file, the queued bytes of
a pipe's read end, 0 on its write end, ENOTTY on the random device, and
throws on a directory or another character device; termios requests
(group 't', TIOCGWINSZ included) fail with ENOTTY, as tcgetattr already
takes these descriptors as not a terminal; any other request throws
naming the request and descriptor kind. Sockets keep their path
unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 12:17:26 +05:30
..
Aio/src Merge pull request #3555 from lisn0/feat/linux-named-shared-memory 2026-10-11 23:55:30 +02:00
AppMetadata fix(libkernel): reject malformed UTF-8 in param JSON 2026-10-11 19:56:55 +04:00
Apr Merge pull request #3808 from MarcZX100/codex/apr-command-size-validation-1930 2026-10-12 00:05:34 +02:00
DirectMemory Merge pull request #4003 from zmeizy/claude/memory-pool-batch-type-protect 2026-10-12 18:20:05 +13:00
Equeue fix(libkernel): report a level-triggered equeue event once per wait 2026-10-11 11:28:34 +00:00
EventFlag/src feat(runtime): timed waits, sync primitive fixes, heap and RTC fixes, unattended-run switches 2026-09-26 19:00:39 -07:00
File feat(libkernel): support ioctl on non-socket descriptors 2026-10-12 12:17:26 +05:30
Module Merge pull request #3713 from SleglJan/fix/libkernel-flexible-module-charge 2026-10-11 23:54:59 +02:00
Pthread Merge pull request #4002 from zmeizy/claude/barrier-destroy-after-release 2026-10-12 18:19:21 +13:00
Semaphore fix(libkernel): report the remaining time from sceKernelWaitSema 2026-10-11 20:09:33 +00:00
Socket feat(libkernel): support ioctl on non-socket descriptors 2026-10-12 12:17:26 +05:30
SyncOnAddress/src feat(libkernel): wake each listed address in _umtx_op UMTX_OP_NWAKE_PRIVATE 2026-10-11 17:48:06 +00:00
System Merge pull request #3715 from Lorkydey/feat/libkernel-wait 2026-10-12 17:35:02 +13:00
Time Merge pull request #3964 from MarcZX100/codex/carry-nanosleep-rmtp 2026-10-12 16:11:26 +13:00
CMakeLists.txt feat(libkernel): support fcntl on non-socket descriptors 2026-10-12 12:17:25 +05:30
KernelErrors.hpp refactor(kernel): share SCE kernel error codes through KernelErrors.hpp 2026-09-27 13:32:28 +07:00
Unimplemented.cpp feat(libkernel): implement thread cancellation 2026-10-10 11:32:09 +02:00