函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Handle write page faults for VM_MIXEDMAP or VM_PFNMAP for a VM_SHARED* mapping

函数原型:static vm_fault_t wp_pfn_shared(struct vm_fault *vmf)

返回类型:vm_fault_t

参数:

类型参数名称
struct vm_fault *vmf
2646  vma等于Target VMA
2648  如果Function pointers to deal with this struct. pfn_mkwrite
2651  pte_unmap_unlock(Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated., Page table lock.* Protects pte page table if 'pte'* is not NULL, otherwise pmd.)
2652  FAULT_FLAG_xxx flags 或等于Fault was mkwrite of existing pte
2653  ret等于pfn_mkwrite(vmf)
2654  如果ret按位与VM_FAULT_ERROR按位或VM_FAULT_NOPAGE的值则返回:ret
2656  返回:sh_mkwrite_fault - finish page fault for a shared mapping, making PTE* writeable once the page is prepared*@vmf: structure describing the fault* This function handles all that is needed to finish a write page fault in a
2658  Handle write page faults for pages that can be reused in the current vma* This can happen either due to the mapping being with the VM_SHARED flag,* or due to us being the last reference standing to the page
2659  返回:VM_FAULT_WRITE
调用者
名称描述
do_wp_pageThis routine handles present pages, when users try to write* to a shared page. It is done by copying the page to a new address* and decrementing the shared-page counter for the old page.* Note that this routine assumes that the protection checks have been