[RFC PATCH 2/3] add statmnt(2) syscall

Christian Brauner brauner at kernel.org
Tue Sep 26 14:13:53 UTC 2023


> I also don't quite understand the dislike of variable-sized records.
> Don't getdents, inotify, Netlink all use them?  And I think at least for
> Netlink, more stuff is added all the time?

Netlink is absolutely atrocious to work with because everything is
variable sized and figuring out the correct allocation size is a
complete nightmare even with the "helpful" macros that are provided.

The bigger problem however is the complete untypedness even of the most
basic things. For example, retrieving the mtu of a network interface
through netlink is a complete nightmare. getdents, inotify, fanotify,
open_by_handle_at()'s struct fiel_handle are all fine. But let's
absolutely not take netlink as a model for anything related to mounts.

And no one is against again variable sized records per se. I think we're
coming to a good compromise here.



More information about the Linux-security-module-archive mailing list