mm-hugetlb-handle-uffd-wp-during-fork.patch removed from -mm tree
The quilt patch titled
Subject: mm/hugetlb: handle uffd-wp during fork()
has been removed from the -mm tree. Its filename was
mm-hugetlb-handle-uffd-wp-during-fork.patch
This patch was dropped because it was merged into the mm-stable branch\nof git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Peter Xu <[email protected]>
Subject: mm/hugetlb: handle uffd-wp during fork()
Firstly, we'll need to pass in dst_vma into copy_hugetlb_page_range() because for uffd-wp it's the dst vma that matters on deciding how we should treat uffd-wp protected ptes.
We should recognize pte markers during fork and do the pte copy if needed.
---
include/linux/hugetlb.h | 7 ++++-- mm/hugetlb.c | 42 +++++++++++++++++++++++++------------- mm/memory.c | 4 +-- 3 files changed, 35 insertions(+), 18 deletions(-)
include/linux/hugetlb.h renamed from include/linux/hugetlb.h~mm-hugetlb-handle-uffd-wp-during-fork +5 -2
@@ -137,7 +137,8 @@ int move_hugetlb_page_tables(struct vm_astruct vm_area_struct *new_vma, unsigned long old_addr, unsigned long new_addr, unsigned long len); -int copy_hugetlb_page_range (struct mm_struct *,struct mm_struct *,struct vm_area_struct *); +int copy_hugetlb_page_range (struct mm_struct *,struct mm_struct *, +struct vm_area_struct *,struct vm_area_struct *); long follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, struct page **, struct vm_area_struct **, unsigned long *, unsigned long *, long, unsigned int,
@@ -269,7 +270,9 @@ static inline struct page *follow_huge_a }static inline int copy_hugetlb_page_range (struct mm_struct *dst, -struct mm_struct *src,struct vm_area_struct *vma) +struct mm_struct *src, +struct vm_area_struct *dst_vma, +struct vm_area_struct *src_vma) {BUG ();return 0 ;
mm/hugetlb.c renamed from mm/hugetlb.c~mm-hugetlb-handle-uffd-wp-during-fork +28 -14
112 lines not on this page · raw message
mm/memory.c renamed from mm/memory.c~mm-hugetlb-handle-uffd-wp-during-fork +2 -2
@@ -1234,7 +1234,7 @@ copy_p4d_range(struct vm_area_struct *ds* false when we can speed up fork() by allowing lazy page faults later until * when the child accesses the memory range. */ -bool +static bool vma_needs_copy (struct vm_area_struct *dst_vma,struct vm_area_struct *src_vma) {/*
@@ -1278,7 +1278,7 @@ copy_page_range(struct vm_area_struct *dreturn 0 ;if (is_vm_hugetlb_page (src_vma)) -return copy_hugetlb_page_range (dst_mm, src_mm, src_vma); +return copy_hugetlb_page_range (dst_mm, src_mm, dst_vma, src_vma);if (unlikely (src_vma->vm_flags &VM_PFNMAP )) {/*
_
Patches currently in -mm which might be from [email protected] are