Re: [PATCH] userfaultfd: snapshot VMA state across UFFDIO_COPY retry
From: Heechan Kang
Date: Sun May 17 2026 - 02:38:44 EST
Hello Mike,
I tested the vma_snapshot patch from this message on top of:
6916d5703ddf ("Merge tag 'drm-fixes-2026-05-16' of https://gitlab.freedesktop.org/drm/kernel")
v7.1-rc3-362-g6916d5703ddf
I used my UFFDIO_COPY MAP_SHARED tmpfs -> MAP_PRIVATE tmpfs replacement
reproducer against a root-owned 0444 sparse tmpfs file.
Before the test:
sha256: ad7facb2586fc6e966c004d7d1d16b024f5805ff7cb47c7a85dabd8b48892ca7
After running 30000 attempts as uid 1000, the reproducer reported:
RESULT: not reproduced after 30000 attempts
The target file remained unchanged:
sha256: ad7facb2586fc6e966c004d7d1d16b024f5805ff7cb47c7a85dabd8b48892ca7
first 32 bytes remained zero
So this patch fixes the MAP_SHARED tmpfs -> MAP_PRIVATE tmpfs replacement
case I tested. I did not separately test the MAP_PRIVATE -> MAP_SHARED
panic case.
Tested-by: Heechan Kang <gganji11@xxxxxxxxx>
Thanks,
Heechan