feat(libkernel): accept a kevent read event on descriptor 0 #6343
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6343"
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 klosixgaming-arch on 2026-10-15T12:27:04Z.
What
EA SPORTS FC 27 (PPSA34015) creates a kqueue at start-up and registers
EVFILT_READfor descriptor 0 in it. The code (eboot0xba76b90) sets up aninputconsole command, then callskqueue()andkevent(kq, {ident 0, EVFILT_READ, EV_ADD}, 1, NULL, 0, NULL), stores the kqueue, and ignoreskevent's result. With the PPSA34015 pull requests listed under Tested applied onmain, the title then stops with:keventnow accepts a read event on the host stream on descriptor 0. The event never triggers, the same wayselectnever reports descriptor 0 readable (libkernel debt, "console title with no input"). The change is limited to that case:The debt entry for kqueue and kevent records the new case.
Tested
mainfor this run.guest_kqueuehas a new case for this and passes on Linux (GCC 13.3), run with descriptor 0 open and with it closed. On Windows, PPSA34015 runs the new path (above). On this Windows machine,guest_kqueuefails later in the existingDeniedParentWatchcase (the vnode watch error lacks "parent"), which this change does not touch and #6173 changes.Checklist
main; no other open PR implements the same functions (#5973 adds pipe read ends to the same function; descriptor 0 here is a console, not a pipe)NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:33: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.
main)docs/dev/debt/libkernel.mdL112-113docs/dev/debt/libkernel.mdL113docs/dev/debt/libkernel.mdL113-114core/libs/prx/libkernel/Equeue/src/Kqueue.cppL142docs/dev/debt/libkernel.mdL113core/libs/prx/libkernel/Equeue/src/Kqueue.cppL2-3docs/dev/debt/libkernel.mdL113Some 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.
docs/dev/debt/libkernel.mdcore/libs/tests/GuestKqueue.cppdocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Equeue/src/Kqueue.cppcore/libs/tests/GuestKqueue.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Equeue/src/Kqueue.cppcore/libs/tests/GuestKqueue.cppdocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Equeue/src/Kqueue.cppcore/libs/tests/GuestKqueue.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdImported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-15T13:05:29Z.
No dependency — this PR builds on neither:
EVFILT_READfor the read end of a pipe. Here descriptor 0 is the host console stream (PPSA34015 registers standard input in a kqueue at start-up), not a pipe. The two add separate branches toAddDescriptorKnote, so they can merge in either order.EV_DISABLE,EV_DISPATCH,EV_FORCEONESHOT); that is a different code path from this descriptor-filter change. The only shared file is the debt doc, where both edit the same kqueue bullet at different parts (this PR adds the sentence about read events on descriptor 0; #5847 removes those flags from the throw list), so whichever merges second resolves it trivially.Imported from boykopovar/AnyPS5. Originally posted by karimibrahim07 on 2026-10-16T14:10:07Z.
Review: COMMENTED
Windows check of head
8078b7ef3, merged ontomain5d9dcc42d(clean merge). Windows 11 Pro (26300), WinLibs GCC 15.2.0 r7, Ninja Release.guest_kqueuepasses on Windows here, including the newStandardInputcase andDeniedParentWatch. So the failure you saw inDeniedParentWatchlooks specific to that machine.guest_select,guest_select_wait,guest_pollandguest_equeue_eventsalso pass.git merge-treereports content conflicts inKqueue.cppand in the kqueue bullet ofdocs/dev/debt/libkernel.md. InKqueue.cpp, #5973 rewrites theif (!GuestSockets::IsOpen(descriptor))block that this PR's new branch sits directly above. The resolution is mechanical: keep this PR's descriptor-0 branch first, then #5973's socket-or-pipe block. The debt sentence needs both additions. Whichever merges second needs that resolution.File::IsHostStream(0)is true for any stream libkernel found at load. That seems the right choice for a console title, which has no input on descriptor 0. If it's intended, the debt sentence could say so.AI-assisted: yes. I ran the build and tests above and the trial merge with #5973.
Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-18T14:58:06Z.
Another title needs this: Assassin's Creed Mirage (PPSA13960, 01.007.000). On
main0d078f75dit stops 7 s after start withkevent: EVFILT_READ on a descriptor that is neither a socket nor the read end of a pipe not implemented. With this PR'sKqueue.cppchange it passes that point; the next stop is a separate main-thread stack issue (#7532), and with #7532 and #7533 as well it runs through its start-up screens (#7534). EA SPORTS FC 25 (PPSA20049) also stops at this kevent read in my runs onmain66702f1cf.