ANDROID: userfaultfd: adjust MOVE ioctl mode to confirm anon_vma removal With anon_vma write-lock in the MOVE ioctl we observed several janky interactions. Recent patches upstream patches resolve the issue [1]. [1] https://lore.kernel.org/all/20250923071019.775806-1-lokeshgidra@google.com/ Bug: 422561794 Change-Id: I2237ddcc12362aed2ebf7f1b3141f71863fef95f Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
diff --git a/include/uapi/linux/userfaultfd.h b/include/uapi/linux/userfaultfd.h index dfac99e..835294fd 100644 --- a/include/uapi/linux/userfaultfd.h +++ b/include/uapi/linux/userfaultfd.h
@@ -330,8 +330,10 @@ struct uffdio_move { * in swap-cache. Also, to avoid livelock when multiple threads try * to move same src folio. It's a KMI workaround and cannot be relied * upon by userspace. + * + * 61: confirm if anon_vma lock has been removed from MOVE ioctl. */ -#define UFFDIO_MOVE_MODE_CONFIRM_FIXED ((__u64)1<<62) +#define UFFDIO_MOVE_MODE_CONFIRM_FIXED ((__u64)1<<61) __u64 mode; /* * "move" is written by the ioctl and must be at the end: the