On Thu, Sep 26, 2024 at 05:34:59PM +0200, Benjamin Berg wrote: > Both of these implementations are broken by design currently and will > not work correctly with any socket that needs to be registered for > multiple event types (reading, writing, exception). Most of the functionality in hostapd and wpa_supplicant uses only EVENT_TYPE_READ. EVENT_TYPE_EXCEPTION is used only with DBus and EVENT_TYPE_WRITE with DBus, WPS ER, RADIUS client, and DPP. Significant percentage of deployed builds are likely not going to be using any of those cases that would hit this constraint. > The reason for this is that the eloop_register_sock API can only take > one event at a time resulting in multiple entries for the FD. However, > epoll_ctl() will refuse to register the FD a second time and kqueue() > will happily overwrite the earlier information. As such, neither > implementation is working correctly. > > Simply remove both, I doubt anyone ever tried to use them as at least > DBus is broken. Also, I don't expect that hostapd/wpa_supplicant has a > lot of FDs/sockets making this a micro-optimization which is likely > pointless in the first place. eloop option for epoll was added with claims of better performance. I do not know how important that might have been for the particular use case, but based on the comments at the time, I would not make the conclusion of it having not been used for whatever features were needed on devices that justified that effort. kqueue commits seem to imply it is for BSD. I don't think lack of support for DBus would be much of an issue there. I don't think it is really best approach to just remove these. It would seem better to make a build fail if epoll or kqueue is attempted to be included with features that are known not to work with them. -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap