函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\userfaultfd.c Create Date:2022-07-27 18:08:59
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:mfill_zeropage_pte

函数原型:static int mfill_zeropage_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr)

返回类型:int

参数:

类型参数名称
struct mm_struct *dst_mm
pmd_t *dst_pmd
struct vm_area_struct *dst_vma
unsigned longdst_addr
153  _dst_pte等于pte_mkspecial(pfn_pte(my_zero_pfn(dst_addr), Access permissions of this VMA. ))
155  dst_pte等于pte_offset_map_lock(dst_mm, dst_pmd, dst_addr, & ptl)
156  如果File we map to (can be NULL).
158  inode等于f_inode
159  offset等于linear_page_index(dst_vma, dst_addr)
160  max_off等于DIV_ROUND_UP(NOTE: in a 32bit arch with a preemptable kernel and* an UP compile the i_size_read/write must be atomic* with respect to the local cpu (unlike with preempt disabled),* but they don't need to be atomic with respect to other cpus like in* true SMP (so they , PAGE_SIZE)
161  ret等于负EFAULT
162  如果此条件成立可能性小(为编译器优化)(offset >= max_off)则转到:out_unlock
165  ret等于负EEXIST
166  如果非pte_none( * dst_pte)则转到:out_unlock
168  set_pte_at(dst_mm, dst_addr, dst_pte, _dst_pte)
170  The x86 doesn't have any external MMU info: the kernel page* tables contain all the necessary information.
171  ret等于0
172  out_unlock :
173  pte_unmap_unlock(dst_pte, ptl)
174  返回:ret
调用者
名称描述
mfill_atomic_pte