Re: [PATCH 17/23] hugetlb/userfaultfd: Handle UFFDIO_WRITEPROTECT
From: Mike Kravetz
Date: Thu Apr 22 2021 - 14:23:21 EST
On 3/22/21 5:49 PM, Peter Xu wrote:
> This starts from passing cp_flags into hugetlb_change_protection() so hugetlb
> will be able to handle MM_CP_UFFD_WP[_RESOLVE] requests.
>
> huge_pte_clear_uffd_wp() is introduced to handle the case where the
> UFFDIO_WRITEPROTECT is requested upon migrating huge page entries.
>
> Signed-off-by: Peter Xu <peterx@xxxxxxxxxx>
> ---
> include/asm-generic/hugetlb.h | 5 +++++
> include/linux/hugetlb.h | 6 ++++--
> mm/hugetlb.c | 13 ++++++++++++-
> mm/mprotect.c | 3 ++-
> mm/userfaultfd.c | 8 ++++++++
> 5 files changed, 31 insertions(+), 4 deletions(-)
Thanks,
Reviewed-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
--
Mike Kravetz