Re: [PATCH v2 1/4] mm: Introduce vm_uffd_ops API
From: David Hildenbrand
Date: Thu Sep 18 2025 - 13:53:53 EST
On 18.09.25 19:45, Lorenzo Stoakes wrote:
On Thu, Sep 18, 2025 at 06:15:41PM +0100, Nikita Kalyazin wrote:
The other patches it I was building on top were mmap support in guest_memfd
[4], which is currently merged in kvm/next, and also part of [3].
[3] https://git.kernel.org/pub/scm/linux/kernel/git/david/linux.git/tree/virt/kvm/guest_memfd.c?id=911634bac3107b237dcd8fdcb6ac91a22741cbe7#n347
[4] https://lore.kernel.org/kvm/20250729225455.670324-1-seanjc@xxxxxxxxxx
Note that the mmap implementation is changing to mmap_prepare. It's the
case in point example of where we exposed an internal mm object (VMA) and
experienced significant issues including embargoed critical zero-day
security reports as a result.
I took a quick look at [3] and it seems you're using it in a totally normal
way which is completely fine, however, and it'll be very easily convertible
to mmap_prepare.
Yes, we'll take care of that once it's (finally :D ) upstream!
Re Nikita: If we could just reuse fault() for userfaultfd purposes, that might actually be pretty nice.
--
Cheers
David / dhildenb