On 06.06.25 15:03, Peter Xu wrote:
On Thu, Jun 05, 2025 at 11:06:38PM +0200, David Hildenbrand wrote:
Not sure if relevant, but consider the following:
an app being controlled by another process using userfaultfd.
The app itself can "escape" uffd control of the other process by simply
creating a userfaultfd and unregistering VMAs.
IMHO it's okay if it's intentional by the child. E.g., even after this
patch, the child, if intentional, can also mmap() a new VMA on top of the
uffd tracked region to stop being trapped by the parent. The parent might
still get a UNMAP event if registered, but it'll not be able to track the
new VMAs mapped.
Ah, I thought there was a way yo track/intercept all new mappings as
well, but looks like that is at least not the case through UFFD_EVENT_*
as it seems.
--
Cheers,
David / dhildenb