You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SUBISSUE #2] Implement AF_NETLINK Sockets (NETLINK_ROUTE and NETLINK_KOBJECT_UEVENT) #296
Add minimal AF_NETLINK socket support needed by ip/ss, libudev, and Wayland/DRM device enumeration tools:
kernel/uapi/socket.hpp: Define AF_NETLINK (16), NETLINK_ROUTE (0), NETLINK_KOBJECT_UEVENT (15), linux_sockaddr_nl (12 bytes), and linux_nlmsghdr (16 bytes) with static_assert checks.
kernel/net/: Implement NetlinkSocket backing NETLINK_ROUTE (RTM_GETLINK, RTM_GETADDR returning lo and eth0 metadata) and NETLINK_KOBJECT_UEVENT multicast group subscription/notification.
kernel/syscalls/SocketSyscalls.cpp: Dispatch AF_NETLINK through socket, bind, getsockname, sendto/recvfrom, sendmsg/recvmsg, and poll/epoll.
tests/host/: Add Snitch ASan/UBSan unit tests covering NETLINK_ROUTE dumps, NLM_F_DUMP/NLMSG_DONE framing, NETLINK_KOBJECT_UEVENT delivery, and cleanup.
Out of scope: dynamic kernel route table mutation (RTM_NEWROUTE) or mount/chroot ([SUBISSUE #3]).
Acceptance Criteria & Edge Cases
RTM_GETLINK and RTM_GETADDR queries return valid NLMSG_ALIGN-padded nlmsghdr responses terminated by NLMSG_DONE
NETLINK_KOBJECT_UEVENT sockets bind to uevent groups cleanly and integrate with poll/epoll
Invalid netlink protocols or truncated messages return negated errno (-EPROTONOSUPPORT, -EINVAL) with zero leaks
make format && make clean-tests && make -j"$(nproc)" all && make -j"$(nproc)" quality passes with zero warnings
Activity