Repository navigation
feat(libkernel): accept a kevent read event on descriptor 0 - #6343
Conversation
|
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.
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.
|
|
No dependency — this PR builds on neither:
|
66989b2 to
8078b7e
Compare
karimibrahim07
left a comment
There was a problem hiding this comment.
Windows check of head 8078b7ef3, merged onto main 5d9dcc42d (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.- It does conflict with #5973, contrary to the comment above. With both heads,
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. - One interaction for that resolution: with this branch first, a descriptor 0 that the host attached to a pipe (a run with stdin redirected) gets the never-triggering knote rather than #5973's pipe readiness, because
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.
8078b7e to
30b2314
Compare
PPSA34015 (EA SPORTS FC 27) registers EVFILT_READ for descriptor 0 in a new kqueue at start-up, ignores the result, and stopped with "kevent: EVFILT_READ on a non-socket descriptor not implemented". A read event on the host stream on descriptor 0 is now accepted and never triggers, as select never reports descriptor 0 readable.
30b2314 to
ce5b0c3
Compare
|
Another title needs this: Assassin's Creed Mirage (PPSA13960, 01.007.000). On |
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 test(libkernel): deny the kqueue parent listing to the token user's SID #6173 changes.Checklist
main; no other open PR implements the same functions (feat(libkernel): support EVFILT_READ on the read end of a pipe #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)