Commit bc70fbf
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.
[lkp@intel.com: vma_needs_copy can be static]
Link: https://lkml.kernel.org/r/Ylb0CGeFJlc4EzLk@7ec4ff11d4ae
Link: https://lkml.kernel.org/r/20220405014918.14932-1-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: "Kirill A . Shutemov" <kirill@shutemov.name>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Nadav Amit <nadav.amit@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 05e90bd commit bc70fbf
3 files changed
+35
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
269 | 270 | | |
270 | 271 | | |
271 | 272 | | |
272 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
273 | 276 | | |
274 | 277 | | |
275 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4719 | 4719 | | |
4720 | 4720 | | |
4721 | 4721 | | |
4722 | | - | |
| 4722 | + | |
| 4723 | + | |
4723 | 4724 | | |
4724 | 4725 | | |
4725 | 4726 | | |
4726 | 4727 | | |
4727 | | - | |
4728 | | - | |
| 4728 | + | |
| 4729 | + | |
4729 | 4730 | | |
4730 | 4731 | | |
4731 | | - | |
| 4732 | + | |
4732 | 4733 | | |
4733 | 4734 | | |
4734 | 4735 | | |
4735 | 4736 | | |
4736 | | - | |
4737 | | - | |
4738 | | - | |
| 4737 | + | |
| 4738 | + | |
| 4739 | + | |
4739 | 4740 | | |
4740 | 4741 | | |
4741 | 4742 | | |
| |||
4749 | 4750 | | |
4750 | 4751 | | |
4751 | 4752 | | |
4752 | | - | |
| 4753 | + | |
4753 | 4754 | | |
4754 | 4755 | | |
4755 | 4756 | | |
4756 | 4757 | | |
4757 | | - | |
| 4758 | + | |
4758 | 4759 | | |
4759 | 4760 | | |
4760 | 4761 | | |
| |||
4789 | 4790 | | |
4790 | 4791 | | |
4791 | 4792 | | |
| 4793 | + | |
4792 | 4794 | | |
4793 | 4795 | | |
4794 | 4796 | | |
| |||
4798 | 4800 | | |
4799 | 4801 | | |
4800 | 4802 | | |
| 4803 | + | |
| 4804 | + | |
4801 | 4805 | | |
4802 | 4806 | | |
4803 | 4807 | | |
| 4808 | + | |
| 4809 | + | |
4804 | 4810 | | |
| 4811 | + | |
| 4812 | + | |
| 4813 | + | |
| 4814 | + | |
| 4815 | + | |
| 4816 | + | |
| 4817 | + | |
4805 | 4818 | | |
4806 | 4819 | | |
4807 | 4820 | | |
| |||
4819 | 4832 | | |
4820 | 4833 | | |
4821 | 4834 | | |
4822 | | - | |
| 4835 | + | |
| 4836 | + | |
4823 | 4837 | | |
4824 | 4838 | | |
4825 | 4839 | | |
4826 | 4840 | | |
4827 | 4841 | | |
4828 | 4842 | | |
4829 | | - | |
| 4843 | + | |
4830 | 4844 | | |
4831 | 4845 | | |
4832 | 4846 | | |
4833 | 4847 | | |
4834 | 4848 | | |
4835 | | - | |
| 4849 | + | |
4836 | 4850 | | |
4837 | 4851 | | |
4838 | 4852 | | |
| |||
4842 | 4856 | | |
4843 | 4857 | | |
4844 | 4858 | | |
4845 | | - | |
| 4859 | + | |
4846 | 4860 | | |
4847 | 4861 | | |
4848 | 4862 | | |
4849 | 4863 | | |
4850 | 4864 | | |
4851 | | - | |
| 4865 | + | |
4852 | 4866 | | |
4853 | 4867 | | |
4854 | 4868 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1234 | 1234 | | |
1235 | 1235 | | |
1236 | 1236 | | |
1237 | | - | |
| 1237 | + | |
1238 | 1238 | | |
1239 | 1239 | | |
1240 | 1240 | | |
| |||
1278 | 1278 | | |
1279 | 1279 | | |
1280 | 1280 | | |
1281 | | - | |
| 1281 | + | |
1282 | 1282 | | |
1283 | 1283 | | |
1284 | 1284 | | |
| |||
0 commit comments