Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory.c Create Date:2022-07-28 14:43:14
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:We enter with non-exclusive mmap_sem (to exclude vma changes,* but allow concurrent faults)

Proto:static vm_fault_t do_fault(struct vm_fault *vmf)

Type:vm_fault_t

Parameter:

TypeParameterName
struct vm_fault *vmf
3751  vma = Target VMA
3752  vm_mm = The address space we belong to.
3758  If Not fault Then
3763  If Value for the false possibility is greater at compile time(!pmd_present( * Pointer to pmd entry matching* the 'address' )) Then ret = VM_FAULT_SIGBUS
3765  Else
3779  Else ret = VM_FAULT_NOPAGE
3784  Else if Not (FAULT_FLAG_xxx flags & Fault was a write access ) Then ret = do_read_fault(vmf)
3786  Else if Not (Flags, see mm.h. & VM_SHARED) Then ret = do_cow_fault(vmf)
3788  Else ret = do_shared_fault(vmf)
3792  If Pre-allocated pte page table.* vm_ops->map_pages() calls* alloc_set_pte() from atomic context.* do_fault_around() pre-allocates* page table to avoid allocation from* atomic context. Then
3793  pte_free - free PTE-level user page table page*@mm: the mm_struct of the current context*@pte_page: the `struct page` representing the page table
3794  Pre-allocated pte page table.* vm_ops->map_pages() calls* alloc_set_pte() from atomic context.* do_fault_around() pre-allocates* page table to avoid allocation from* atomic context. = NULL
3796  Return ret
Caller
NameDescribe
handle_pte_faultThese routines also need to handle stuff like marking pages dirty* and/or accessed for architectures that don't do it in hardware (most* RISC architectures)