blob: af0a52c80b9a0fe34505197802eb72547de3bc7d [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * mm/userfaultfd.c
4 *
5 * Copyright (C) 2015 Red Hat, Inc.
6 */
7
8#include <linux/mm.h>
9#include <linux/sched/signal.h>
10#include <linux/pagemap.h>
11#include <linux/rmap.h>
12#include <linux/swap.h>
13#include <linux/swapops.h>
14#include <linux/userfaultfd_k.h>
15#include <linux/mmu_notifier.h>
16#include <linux/hugetlb.h>
17#include <linux/shmem_fs.h>
18#include <asm/tlbflush.h>
19#include "internal.h"
20
21/*
22 * Install PTEs, to map dst_addr (within dst_vma) to page.
23 *
24 * This function handles both MCOPY_ATOMIC_NORMAL and _CONTINUE for both shmem
25 * and anon, and for both shared and private VMAs.
26 */
27int mfill_atomic_install_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd,
28 struct vm_area_struct *dst_vma,
29 unsigned long dst_addr, struct page *page,
30 bool newly_allocated)
31{
32 int ret;
33 pte_t _dst_pte, *dst_pte;
34 bool writable = dst_vma->vm_flags & VM_WRITE;
35 bool vm_shared = dst_vma->vm_flags & VM_SHARED;
36 bool page_in_cache = page->mapping;
37 spinlock_t *ptl;
38 struct inode *inode;
39 pgoff_t offset, max_off;
40
41 _dst_pte = mk_pte(page, dst_vma->vm_page_prot);
42 if (page_in_cache && !vm_shared)
43 writable = false;
44 if (writable || !page_in_cache)
45 _dst_pte = pte_mkdirty(_dst_pte);
46 if (writable)
47 _dst_pte = pte_mkwrite(_dst_pte);
48
49 dst_pte = pte_offset_map_lock(dst_mm, dst_pmd, dst_addr, &ptl);
50
51 if (vma_is_shmem(dst_vma)) {
52 /* serialize against truncate with the page table lock */
53 inode = dst_vma->vm_file->f_inode;
54 offset = linear_page_index(dst_vma, dst_addr);
55 max_off = DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE);
56 ret = -EFAULT;
57 if (unlikely(offset >= max_off))
58 goto out_unlock;
59 }
60
61 ret = -EEXIST;
62 if (!pte_none(*dst_pte))
63 goto out_unlock;
64
65 if (page_in_cache)
66 page_add_file_rmap(page, false);
67 else
68 page_add_new_anon_rmap(page, dst_vma, dst_addr, false);
69
70 /*
71 * Must happen after rmap, as mm_counter() checks mapping (via
72 * PageAnon()), which is set by __page_set_anon_rmap().
73 */
74 inc_mm_counter(dst_mm, mm_counter(page));
75
76 if (newly_allocated)
77 lru_cache_add_active_or_unevictable(page, dst_vma);
78
79 set_pte_at(dst_mm, dst_addr, dst_pte, _dst_pte);
80
81 /* No need to invalidate - it was non-present before */
82 update_mmu_cache(dst_vma, dst_addr, dst_pte);
83 ret = 0;
84out_unlock:
85 pte_unmap_unlock(dst_pte, ptl);
86 return ret;
87}
88
89static int mcopy_atomic_pte(struct mm_struct *dst_mm,
90 pmd_t *dst_pmd,
91 struct vm_area_struct *dst_vma,
92 unsigned long dst_addr,
93 unsigned long src_addr,
94 struct page **pagep)
95{
96 struct mem_cgroup *memcg;
97 void *page_kaddr;
98 int ret;
99 struct page *page;
100
101 if (!*pagep) {
102 ret = -ENOMEM;
103 page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, dst_vma, dst_addr);
104 if (!page)
105 goto out;
106
107 page_kaddr = kmap_atomic(page);
108 ret = copy_from_user(page_kaddr,
109 (const void __user *) src_addr,
110 PAGE_SIZE);
111 kunmap_atomic(page_kaddr);
112
113 /* fallback to copy_from_user outside mmap_sem */
114 if (unlikely(ret)) {
115 ret = -ENOENT;
116 *pagep = page;
117 /* don't free the page */
118 goto out;
119 }
120
121 flush_dcache_page(page);
122 } else {
123 page = *pagep;
124 *pagep = NULL;
125 }
126
127 /*
128 * The memory barrier inside __SetPageUptodate makes sure that
129 * preceeding stores to the page contents become visible before
130 * the set_pte_at() write.
131 */
132 __SetPageUptodate(page);
133
134 ret = -ENOMEM;
135 if (mem_cgroup_try_charge(page, dst_mm, GFP_KERNEL, &memcg, false))
136 goto out_release;
137
138 ret = mfill_atomic_install_pte(dst_mm, dst_pmd, dst_vma, dst_addr,
139 page, true);
140 if (ret) {
141 mem_cgroup_cancel_charge(page, memcg, false);
142 goto out_release;
143 }
144 mem_cgroup_commit_charge(page, memcg, false, false);
145out:
146 return ret;
147out_release:
148 put_page(page);
149 goto out;
150}
151
152static int mfill_zeropage_pte(struct mm_struct *dst_mm,
153 pmd_t *dst_pmd,
154 struct vm_area_struct *dst_vma,
155 unsigned long dst_addr)
156{
157 pte_t _dst_pte, *dst_pte;
158 spinlock_t *ptl;
159 int ret;
160 pgoff_t offset, max_off;
161 struct inode *inode;
162
163 _dst_pte = pte_mkspecial(pfn_pte(my_zero_pfn(dst_addr),
164 dst_vma->vm_page_prot));
165 dst_pte = pte_offset_map_lock(dst_mm, dst_pmd, dst_addr, &ptl);
166 if (dst_vma->vm_file) {
167 /* the shmem MAP_PRIVATE case requires checking the i_size */
168 inode = dst_vma->vm_file->f_inode;
169 offset = linear_page_index(dst_vma, dst_addr);
170 max_off = DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE);
171 ret = -EFAULT;
172 if (unlikely(offset >= max_off))
173 goto out_unlock;
174 }
175 ret = -EEXIST;
176 if (!pte_none(*dst_pte))
177 goto out_unlock;
178 set_pte_at(dst_mm, dst_addr, dst_pte, _dst_pte);
179 /* No need to invalidate - it was non-present before */
180 update_mmu_cache(dst_vma, dst_addr, dst_pte);
181 ret = 0;
182out_unlock:
183 pte_unmap_unlock(dst_pte, ptl);
184 return ret;
185}
186
187/* Handles UFFDIO_CONTINUE for all shmem VMAs (shared or private). */
188static int mcontinue_atomic_pte(struct mm_struct *dst_mm,
189 pmd_t *dst_pmd,
190 struct vm_area_struct *dst_vma,
191 unsigned long dst_addr)
192{
193 struct inode *inode = file_inode(dst_vma->vm_file);
194 pgoff_t pgoff = linear_page_index(dst_vma, dst_addr);
195 struct page *page;
196 int ret;
197
198 ret = shmem_getpage(inode, pgoff, &page, SGP_READ);
199 if (ret)
200 goto out;
201 if (!page) {
202 ret = -EFAULT;
203 goto out;
204 }
205
206 ret = mfill_atomic_install_pte(dst_mm, dst_pmd, dst_vma, dst_addr,
207 page, false);
208 if (ret)
209 goto out_release;
210
211 unlock_page(page);
212 ret = 0;
213out:
214 return ret;
215out_release:
216 unlock_page(page);
217 put_page(page);
218 goto out;
219}
220
221static pmd_t *mm_alloc_pmd(struct mm_struct *mm, unsigned long address)
222{
223 pgd_t *pgd;
224 p4d_t *p4d;
225 pud_t *pud;
226
227 pgd = pgd_offset(mm, address);
228 p4d = p4d_alloc(mm, pgd, address);
229 if (!p4d)
230 return NULL;
231 pud = pud_alloc(mm, p4d, address);
232 if (!pud)
233 return NULL;
234 /*
235 * Note that we didn't run this because the pmd was
236 * missing, the *pmd may be already established and in
237 * turn it may also be a trans_huge_pmd.
238 */
239 return pmd_alloc(mm, pud, address);
240}
241
242#ifdef CONFIG_HUGETLB_PAGE
243/*
244 * __mcopy_atomic processing for HUGETLB vmas. Note that this routine is
245 * called with mmap_sem held, it will release mmap_sem before returning.
246 */
247static __always_inline ssize_t __mcopy_atomic_hugetlb(struct mm_struct *dst_mm,
248 struct vm_area_struct *dst_vma,
249 unsigned long dst_start,
250 unsigned long src_start,
251 unsigned long len,
252 bool *mmap_changing,
253 enum mcopy_atomic_mode mode)
254{
255 int vm_alloc_shared = dst_vma->vm_flags & VM_SHARED;
256 int vm_shared = dst_vma->vm_flags & VM_SHARED;
257 ssize_t err;
258 pte_t *dst_pte;
259 unsigned long src_addr, dst_addr;
260 long copied;
261 struct page *page;
262 struct hstate *h;
263 unsigned long vma_hpagesize;
264 pgoff_t idx;
265 u32 hash;
266 struct address_space *mapping;
267
268 /*
269 * There is no default zero huge page for all huge page sizes as
270 * supported by hugetlb. A PMD_SIZE huge pages may exist as used
271 * by THP. Since we can not reliably insert a zero page, this
272 * feature is not supported.
273 */
274 if (mode == MCOPY_ATOMIC_ZEROPAGE) {
275 up_read(&dst_mm->mmap_sem);
276 return -EINVAL;
277 }
278
279 src_addr = src_start;
280 dst_addr = dst_start;
281 copied = 0;
282 page = NULL;
283 vma_hpagesize = vma_kernel_pagesize(dst_vma);
284
285 /*
286 * Validate alignment based on huge page size
287 */
288 err = -EINVAL;
289 if (dst_start & (vma_hpagesize - 1) || len & (vma_hpagesize - 1))
290 goto out_unlock;
291
292retry:
293 /*
294 * On routine entry dst_vma is set. If we had to drop mmap_sem and
295 * retry, dst_vma will be set to NULL and we must lookup again.
296 */
297 if (!dst_vma) {
298 err = -ENOENT;
299 dst_vma = find_vma(dst_mm, dst_start);
300 if (!dst_vma || !is_vm_hugetlb_page(dst_vma))
301 goto out_unlock;
302 /*
303 * Check the vma is registered in uffd, this is
304 * required to enforce the VM_MAYWRITE check done at
305 * uffd registration time.
306 */
307 if (!dst_vma->vm_userfaultfd_ctx.ctx)
308 goto out_unlock;
309
310 if (dst_start < dst_vma->vm_start ||
311 dst_start + len > dst_vma->vm_end)
312 goto out_unlock;
313
314 err = -EINVAL;
315 if (vma_hpagesize != vma_kernel_pagesize(dst_vma))
316 goto out_unlock;
317
318 vm_shared = dst_vma->vm_flags & VM_SHARED;
319 }
320
321 if (WARN_ON(dst_addr & (vma_hpagesize - 1) ||
322 (len - copied) & (vma_hpagesize - 1)))
323 goto out_unlock;
324
325 /*
326 * If not shared, ensure the dst_vma has a anon_vma.
327 */
328 err = -ENOMEM;
329 if (!vm_shared) {
330 if (unlikely(anon_vma_prepare(dst_vma)))
331 goto out_unlock;
332 }
333
334 h = hstate_vma(dst_vma);
335
336 while (src_addr < src_start + len) {
337 BUG_ON(dst_addr >= dst_start + len);
338 VM_BUG_ON(dst_addr & ~huge_page_mask(h));
339
340 /*
341 * Serialize via hugetlb_fault_mutex
342 */
343 idx = linear_page_index(dst_vma, dst_addr);
344 mapping = dst_vma->vm_file->f_mapping;
345 hash = hugetlb_fault_mutex_hash(h, mapping, idx);
346 mutex_lock(&hugetlb_fault_mutex_table[hash]);
347
348 err = -ENOMEM;
349 dst_pte = huge_pte_alloc(dst_mm, dst_vma, dst_addr, huge_page_size(h));
350 if (!dst_pte) {
351 mutex_unlock(&hugetlb_fault_mutex_table[hash]);
352 goto out_unlock;
353 }
354
355 if (mode != MCOPY_ATOMIC_CONTINUE &&
356 !huge_pte_none(huge_ptep_get(dst_pte))) {
357 err = -EEXIST;
358 mutex_unlock(&hugetlb_fault_mutex_table[hash]);
359 goto out_unlock;
360 }
361
362 err = hugetlb_mcopy_atomic_pte(dst_mm, dst_pte, dst_vma,
363 dst_addr, src_addr, mode, &page);
364
365 mutex_unlock(&hugetlb_fault_mutex_table[hash]);
366 vm_alloc_shared = vm_shared;
367
368 cond_resched();
369
370 if (unlikely(err == -ENOENT)) {
371 up_read(&dst_mm->mmap_sem);
372 BUG_ON(!page);
373
374 err = copy_huge_page_from_user(page,
375 (const void __user *)src_addr,
376 pages_per_huge_page(h), true);
377 if (unlikely(err)) {
378 err = -EFAULT;
379 goto out;
380 }
381 down_read(&dst_mm->mmap_sem);
382 /*
383 * If memory mappings are changing because of non-cooperative
384 * operation (e.g. mremap) running in parallel, bail out and
385 * request the user to retry later
386 */
387 if (mmap_changing && READ_ONCE(*mmap_changing)) {
388 err = -EAGAIN;
389 break;
390 }
391
392 dst_vma = NULL;
393 goto retry;
394 } else
395 BUG_ON(page);
396
397 if (!err) {
398 dst_addr += vma_hpagesize;
399 src_addr += vma_hpagesize;
400 copied += vma_hpagesize;
401
402 if (fatal_signal_pending(current))
403 err = -EINTR;
404 }
405 if (err)
406 break;
407 }
408
409out_unlock:
410 up_read(&dst_mm->mmap_sem);
411out:
412 if (page) {
413 /*
414 * We encountered an error and are about to free a newly
415 * allocated huge page.
416 *
417 * Reservation handling is very subtle, and is different for
418 * private and shared mappings. See the routine
419 * restore_reserve_on_error for details. Unfortunately, we
420 * can not call restore_reserve_on_error now as it would
421 * require holding mmap_sem.
422 *
423 * If a reservation for the page existed in the reservation
424 * map of a private mapping, the map was modified to indicate
425 * the reservation was consumed when the page was allocated.
426 * We clear the PagePrivate flag now so that the global
427 * reserve count will not be incremented in free_huge_page.
428 * The reservation map will still indicate the reservation
429 * was consumed and possibly prevent later page allocation.
430 * This is better than leaking a global reservation. If no
431 * reservation existed, it is still safe to clear PagePrivate
432 * as no adjustments to reservation counts were made during
433 * allocation.
434 *
435 * The reservation map for shared mappings indicates which
436 * pages have reservations. When a huge page is allocated
437 * for an address with a reservation, no change is made to
438 * the reserve map. In this case PagePrivate will be set
439 * to indicate that the global reservation count should be
440 * incremented when the page is freed. This is the desired
441 * behavior. However, when a huge page is allocated for an
442 * address without a reservation a reservation entry is added
443 * to the reservation map, and PagePrivate will not be set.
444 * When the page is freed, the global reserve count will NOT
445 * be incremented and it will appear as though we have leaked
446 * reserved page. In this case, set PagePrivate so that the
447 * global reserve count will be incremented to match the
448 * reservation map entry which was created.
449 *
450 * Note that vm_alloc_shared is based on the flags of the vma
451 * for which the page was originally allocated. dst_vma could
452 * be different or NULL on error.
453 */
454 if (vm_alloc_shared)
455 SetPagePrivate(page);
456 else
457 ClearPagePrivate(page);
458 put_page(page);
459 }
460 BUG_ON(copied < 0);
461 BUG_ON(err > 0);
462 BUG_ON(!copied && !err);
463 return copied ? copied : err;
464}
465#else /* !CONFIG_HUGETLB_PAGE */
466/* fail at build time if gcc attempts to use this */
467extern ssize_t __mcopy_atomic_hugetlb(struct mm_struct *dst_mm,
468 struct vm_area_struct *dst_vma,
469 unsigned long dst_start,
470 unsigned long src_start,
471 unsigned long len,
472 bool *mmap_changing,
473 enum mcopy_atomic_mode mode);
474#endif /* CONFIG_HUGETLB_PAGE */
475
476static __always_inline ssize_t mfill_atomic_pte(struct mm_struct *dst_mm,
477 pmd_t *dst_pmd,
478 struct vm_area_struct *dst_vma,
479 unsigned long dst_addr,
480 unsigned long src_addr,
481 struct page **page,
482 enum mcopy_atomic_mode mode)
483{
484 ssize_t err;
485
486 if (mode == MCOPY_ATOMIC_CONTINUE)
487 return mcontinue_atomic_pte(dst_mm, dst_pmd, dst_vma, dst_addr);
488
489 /*
490 * The normal page fault path for a shmem will invoke the
491 * fault, fill the hole in the file and COW it right away. The
492 * result generates plain anonymous memory. So when we are
493 * asked to fill an hole in a MAP_PRIVATE shmem mapping, we'll
494 * generate anonymous memory directly without actually filling
495 * the hole. For the MAP_PRIVATE case the robustness check
496 * only happens in the pagetable (to verify it's still none)
497 * and not in the radix tree.
498 */
499 if (!(dst_vma->vm_flags & VM_SHARED)) {
500 if (mode == MCOPY_ATOMIC_NORMAL)
501 err = mcopy_atomic_pte(dst_mm, dst_pmd, dst_vma,
502 dst_addr, src_addr, page);
503 else
504 err = mfill_zeropage_pte(dst_mm, dst_pmd,
505 dst_vma, dst_addr);
506 } else {
507 err = shmem_mfill_atomic_pte(dst_mm, dst_pmd, dst_vma,
508 dst_addr, src_addr,
509 mode != MCOPY_ATOMIC_NORMAL,
510 page);
511 }
512
513 return err;
514}
515
516static __always_inline ssize_t __mcopy_atomic(struct mm_struct *dst_mm,
517 unsigned long dst_start,
518 unsigned long src_start,
519 unsigned long len,
520 enum mcopy_atomic_mode mcopy_mode,
521 bool *mmap_changing)
522{
523 struct vm_area_struct *dst_vma;
524 ssize_t err;
525 pmd_t *dst_pmd;
526 unsigned long src_addr, dst_addr;
527 long copied;
528 struct page *page;
529
530 /*
531 * Sanitize the command parameters:
532 */
533 BUG_ON(dst_start & ~PAGE_MASK);
534 BUG_ON(len & ~PAGE_MASK);
535
536 /* Does the address range wrap, or is the span zero-sized? */
537 BUG_ON(src_start + len <= src_start);
538 BUG_ON(dst_start + len <= dst_start);
539
540 src_addr = src_start;
541 dst_addr = dst_start;
542 copied = 0;
543 page = NULL;
544retry:
545 down_read(&dst_mm->mmap_sem);
546
547 /*
548 * If memory mappings are changing because of non-cooperative
549 * operation (e.g. mremap) running in parallel, bail out and
550 * request the user to retry later
551 */
552 err = -EAGAIN;
553 if (mmap_changing && READ_ONCE(*mmap_changing))
554 goto out_unlock;
555
556 /*
557 * Make sure the vma is not shared, that the dst range is
558 * both valid and fully within a single existing vma.
559 */
560 err = -ENOENT;
561 dst_vma = find_vma(dst_mm, dst_start);
562 if (!dst_vma)
563 goto out_unlock;
564 /*
565 * Check the vma is registered in uffd, this is required to
566 * enforce the VM_MAYWRITE check done at uffd registration
567 * time.
568 */
569 if (!dst_vma->vm_userfaultfd_ctx.ctx)
570 goto out_unlock;
571
572 if (dst_start < dst_vma->vm_start ||
573 dst_start + len > dst_vma->vm_end)
574 goto out_unlock;
575
576 err = -EINVAL;
577 /*
578 * shmem_zero_setup is invoked in mmap for MAP_ANONYMOUS|MAP_SHARED but
579 * it will overwrite vm_ops, so vma_is_anonymous must return false.
580 */
581 if (WARN_ON_ONCE(vma_is_anonymous(dst_vma) &&
582 dst_vma->vm_flags & VM_SHARED))
583 goto out_unlock;
584
585 /*
586 * If this is a HUGETLB vma, pass off to appropriate routine
587 */
588 if (is_vm_hugetlb_page(dst_vma))
589 return __mcopy_atomic_hugetlb(dst_mm, dst_vma, dst_start,
590 src_start, len, mmap_changing,
591 zeropage);
592
593 if (!vma_is_anonymous(dst_vma) && !vma_is_shmem(dst_vma))
594 goto out_unlock;
595 if (!vma_is_shmem(dst_vma) && mcopy_mode == MCOPY_ATOMIC_CONTINUE)
596 goto out_unlock;
597
598 /*
599 * Ensure the dst_vma has a anon_vma or this page
600 * would get a NULL anon_vma when moved in the
601 * dst_vma.
602 */
603 err = -ENOMEM;
604 if (!(dst_vma->vm_flags & VM_SHARED) &&
605 unlikely(anon_vma_prepare(dst_vma)))
606 goto out_unlock;
607
608 while (src_addr < src_start + len) {
609 pmd_t dst_pmdval;
610
611 BUG_ON(dst_addr >= dst_start + len);
612
613 dst_pmd = mm_alloc_pmd(dst_mm, dst_addr);
614 if (unlikely(!dst_pmd)) {
615 err = -ENOMEM;
616 break;
617 }
618
619 dst_pmdval = pmd_read_atomic(dst_pmd);
620 /*
621 * If the dst_pmd is mapped as THP don't
622 * override it and just be strict.
623 */
624 if (unlikely(pmd_trans_huge(dst_pmdval))) {
625 err = -EEXIST;
626 break;
627 }
628 if (unlikely(pmd_none(dst_pmdval)) &&
629 unlikely(__pte_alloc(dst_mm, dst_pmd))) {
630 err = -ENOMEM;
631 break;
632 }
633 /* If an huge pmd materialized from under us fail */
634 if (unlikely(pmd_trans_huge(*dst_pmd))) {
635 err = -EFAULT;
636 break;
637 }
638
639 BUG_ON(pmd_none(*dst_pmd));
640 BUG_ON(pmd_trans_huge(*dst_pmd));
641
642 err = mfill_atomic_pte(dst_mm, dst_pmd, dst_vma, dst_addr,
643 src_addr, &page, mcopy_mode);
644 cond_resched();
645
646 if (unlikely(err == -ENOENT)) {
647 void *page_kaddr;
648
649 up_read(&dst_mm->mmap_sem);
650 BUG_ON(!page);
651
652 page_kaddr = kmap(page);
653 err = copy_from_user(page_kaddr,
654 (const void __user *) src_addr,
655 PAGE_SIZE);
656 kunmap(page);
657 if (unlikely(err)) {
658 err = -EFAULT;
659 goto out;
660 }
661 flush_dcache_page(page);
662 goto retry;
663 } else
664 BUG_ON(page);
665
666 if (!err) {
667 dst_addr += PAGE_SIZE;
668 src_addr += PAGE_SIZE;
669 copied += PAGE_SIZE;
670
671 if (fatal_signal_pending(current))
672 err = -EINTR;
673 }
674 if (err)
675 break;
676 }
677
678out_unlock:
679 up_read(&dst_mm->mmap_sem);
680out:
681 if (page)
682 put_page(page);
683 BUG_ON(copied < 0);
684 BUG_ON(err > 0);
685 BUG_ON(!copied && !err);
686 return copied ? copied : err;
687}
688
689ssize_t mcopy_atomic(struct mm_struct *dst_mm, unsigned long dst_start,
690 unsigned long src_start, unsigned long len,
691 bool *mmap_changing)
692{
693 return __mcopy_atomic(dst_mm, dst_start, src_start, len,
694 MCOPY_ATOMIC_NORMAL, mmap_changing);
695}
696
697ssize_t mfill_zeropage(struct mm_struct *dst_mm, unsigned long start,
698 unsigned long len, bool *mmap_changing)
699{
700 return __mcopy_atomic(dst_mm, start, 0, len, MCOPY_ATOMIC_ZEROPAGE,
701 mmap_changing);
702}
703
704ssize_t mcopy_continue(struct mm_struct *dst_mm, unsigned long start,
705 unsigned long len, bool *mmap_changing)
706{
707 return __mcopy_atomic(dst_mm, start, 0, len, MCOPY_ATOMIC_CONTINUE,
708 mmap_changing);
709}
710