feat(libkernel): export _ioctl and getsid #3493
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3493"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-11T11:35:54Z.
What
Exports
_ioctl(wW+k21cmbwQ) andgetsid(gokWod7GAH4) from libkernel. Both throw:_ioctlnames the request it got (_ioctl: request 0x402c7413 not implemented), andgetsidreportsgetsid: process sessions not implemented. No device-control requests or POSIX sessions are modelled, and Windows has no POSIX session to report.Stremio Plus (PPSA74126) fails to load without them. On Windows,
main03a84d02, catalog build (eboot.binandsce_module/libc.prxunwrapped), 60 s run:After
_ioctl, the next load stop isgokWod7GAH4(getsid), the title's last absent import (tools/import_audit.py). With both exported, Stremio Plus loads, runs, and reaches its renderer, where it stops on a graphics state AnyPS5 doesn't support yet:It made no call to either export in that run. The executable's
_ioctlcall sites (from--registry) are the SDK libc'stermioswrappers linked into it:TIOCGETA0x402c7413andTIOCSETA/W/F(tcgetattr/tcsetattr);TIOCGPGRP/TIOCSPGRP;TIOCDRAIN,TIOCFLUSH,TIOCSTART/TIOCSTOP, and the like.They're one per wrapper, which is why the two are needed to load.
guest_ioctl_getsidchecks both throws (two requests, twogetsidarguments).TechnicalDebt.mdrecords them next to thesigtimedwaitentry.Tested
Windows 11 (10.0.26200), WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON, onmain0f863c10:guest_ioctl_getsidpasses 3/3. WithOpen.cppandProcess.cppreverted tomainit doesn't link.ctest -E "^agc_|video_out": 452/453. The one failure,windows_exceptions, fails onmaintoo (#3411).VK_LOADER_DRIVERS_DISABLE=*dzn*for #3255).check_conventions.pypasses. Open PRs that also touchOpen.cpporProcess.cpp:mainon its own.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T11:36:17Z.
Progress report (
a9a34e9→76d43c5)📉 System libraries: 85.96% (-0.03%, +1 declared functions)
🆕 1 declared as stubs
getsid_nid_postfixImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T11:50:29Z.
The overlap check now reports #3487, which also changes
_ioctl_nid_postfixinOpen.cppbut forwards to the existingioctlimplementation and has coverage for the supported socket requests. This PR adds a throwing_ioctlstub for the same export, so the two heads cannot both be applied as written and the behaviors differ.Could you coordinate the
getsidaddition with #3487's author or make this depend on #3487 and limit this branch togetsid? That would preserve the implemented_ioctlbehavior while retaining the separate load fix here.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T12:02:25Z.
Thanks. #3487 merged
_ioctl(forwarding to the existingioctl) while this was open, so both heads together define_ioctl_nid_postfixtwice. I pushed a commit that keeps onlygetsid:_ioctlfromOpen.cppand its two rows fromGuestIoctlGetsid.cpp.getsidalone.Checked on current
main+ this branch:guest_ioctl_getsid,guest_udp,guest_sigtimedwaitpass, and thegetsidtest doesn't link without the change.getsidthrowing is exact-or-throw (no sessions modelled). Merging once CI is green.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T12:07:27Z.
Thanks. #3487 merged
_ioctl(forwarding to the existingioctl) while this was open, so both heads together define_ioctl_nid_postfixtwice. I pushed a commit that keeps onlygetsid:_ioctlfromOpen.cppand its two rows fromGuestIoctlGetsid.cpp.getsidalone.Checked on current
main+ this branch:guest_ioctl_getsid,guest_udp,guest_sigtimedwaitpass, and thegetsidtest doesn't link without the change.getsidthrowing is exact-or-throw (no sessions modelled). Merging once CI is green.Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-11T13:01:38Z.
Thanks @adriadam10 for trimming it to
getsid. #3487's forwarding_ioctlis the better export; Stremio Plus only needs it to exist.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T14:28:39Z.
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.
main)docs/dev/TechnicalDebt.mdL602Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-11T20:32:35Z.
I checked this PR on both OSes with Stremio Plus (PPSA74126, catalog build), merged onto
main0a8b1d32(test merge aa75c723).main, Windows:FAIL: unresolved ELF import gokWod7GAH4 (getsid) from libkernel.prxDisplayWindow(the runner has no display).last provoking vertex with explicit per-vertex flat interpolation is unsupported(#3581).getsidis not called before that point.guest_ioctl_getsidpasses 5/5 (--repeat until-fail:5) on both. No warnings inProcess.cpporGuestIoctlGetsid.cpp.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:28:51Z.
The red checks were not caused by this PR:
conventionsandrelinkerfailed at checkout (No url found for submodule path '3rdparty/imgui'), a stray gitlink that was onmainand is now removed (fab9f576a). A rerun reused the old merge commit, so I rebased the branch onto currentmain(no conflicts, no logic change) to get fresh CI.guest_ioctl_getsidand the scoped ctest (113 tests) pass on the rebased head. Merging once CI is green.