How about an updated commit like this?
Currently, most of the userfaultfd features are implemented directly in the
core mm. It will invoke VMA specific functions whenever necessary. So far
it is fine because it almost only interacts with shmem and hugetlbfs.
This patch introduces a generic userfaultfd API for vm_operations_struct,
so that any type of file (including kernel modules that can be compiled
separately from the kernel core) can support userfaults without modifying
the core files.
.... is it really "any file" ? I doubt it, but you likely have a better idea
on how it all could just work with "any file".
After this API applied, if a module wants to support userfaultfd, the
module should only need to touch its own file and properly define
vm_uffd_ops, instead of changing anything in core mm.
...
Talking about files and modules is still confusing I'm afraid. It's really a
special-purpose file (really, not any ordinary files on ordinary
filesystems), no?
One major reason I wanted to avoid the term "in-memory" is that we already
support most of the files on WP_ASYNC, so emphasizing on in-memory might be
misleading, even though WP_ASYNC isn't much taken into the picture of the
vm_uffd_ops being proposed.