函数逻辑报告 |
Source Code:mm\userfaultfd.c |
Create Date:2022-07-27 18:09:26 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__mcopy_atomic
函数原型:static __always_inline ssize_t __mcopy_atomic(struct mm_struct *dst_mm, unsigned long dst_start, unsigned long src_start, unsigned long len, bool zeropage, bool *mmap_changing)
返回类型:ssize_t
参数:
类型 | 参数 | 名称 |
---|---|---|
struct mm_struct * | dst_mm | |
unsigned long | dst_start | |
unsigned long | src_start | |
unsigned long | len | |
bool | zeropage | |
bool * | mmap_changing |
471 | copied等于0 |
472 | page = NULL |
473 | retry : |
474 | lock for reading |
482 | 如果mmap_changing且READ_ONCE( * mmap_changing)则转到:out_unlock |
490 | dst_vma等于find_dst_vma(dst_mm, dst_start, len) |
491 | 如果非dst_vma则转到:out_unlock |
499 | 如果WARN_ON_ONCE(vma_is_anonymous(dst_vma) && Flags, see mm.h. & VM_SHARED)则转到:out_unlock |
506 | 如果is_vm_hugetlb_page(dst_vma)则返回:__mcopy_atomic processing for HUGETLB vmas. Note that this routine is* called with mmap_sem held, it will release mmap_sem before returning. |
510 | 如果非vma_is_anonymous(dst_vma)且非vma_is_shmem(dst_vma)则转到:out_unlock |
519 | 如果非Flags, see mm.h. 按位与VM_SHARED的值且此条件成立可能性小(为编译器优化)(anon_vma_prepare(dst_vma))则转到:out_unlock |
528 | dst_pmd等于mm_alloc_pmd(dst_mm, dst_addr) |
529 | 如果此条件成立可能性小(为编译器优化)(!dst_pmd)则 |
534 | dst_pmdval等于pmd_read_atomic(dst_pmd) |
539 | 如果此条件成立可能性小(为编译器优化)(pmd_trans_huge(dst_pmdval))则 |
549 | 如果此条件成立可能性小(为编译器优化)(pmd_trans_huge( * dst_pmd))则 |
555 | BUG_ON(pmd_trans_huge( * dst_pmd)) |
559 | cond_resched() |
561 | 如果此条件成立可能性小(为编译器优化)(err == - ENOENT)则 |
567 | page_kaddr等于kmap(page) |
568 | err等于copy_from_user(page_kaddr, (constvoid__user * )src_addr, PAGE_SIZE) |
572 | 如果此条件成立可能性小(为编译器优化)(err)则 |
576 | 转到:retry |
580 | 如果非err则 |
585 | 如果fatal_signal_pending(当前进程)则err等于负EINTR |
592 | out_unlock : |
594 | out : |
595 | 如果page则Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page. |
名称 | 描述 |
---|---|
mcopy_atomic | |
mfill_zeropage |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |