Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-28 13:35:40
Last Modify:2022-05-20 07:50:19 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:perf_mmap_fault

Proto:static vm_fault_t perf_mmap_fault(struct vm_fault *vmf)

Type:vm_fault_t

Parameter:

TypeParameterName
struct vm_fault *vmf
5518  event = private_data
5520  ret = VM_FAULT_SIGBUS
5522  If FAULT_FLAG_xxx flags & Fault was mkwrite of existing pte Then
5523  If Logical page offset based on vma == 0 Then ret = 0
5525  Return ret
5528  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
5529  rb = fetch RCU-protected pointer for dereferencing(rb)
5530  If Not rb Then Go to unlock
5533  If Logical page offset based on vma && FAULT_FLAG_xxx flags & Fault was a write access Then Go to unlock
5536  ->fault handlers should return a* page here, unless VM_FAULT_NOPAGE* is set (which is also implied by* VM_FAULT_ERROR). = perf_mmap_to_page(rb, Logical page offset based on vma )
5537  If Not ->fault handlers should return a* page here, unless VM_FAULT_NOPAGE* is set (which is also implied by* VM_FAULT_ERROR). Then Go to unlock
5540  get_page(->fault handlers should return a* page here, unless VM_FAULT_NOPAGE* is set (which is also implied by* VM_FAULT_ERROR).)
5541  mapping = f_mapping
5542  index = Logical page offset based on vma
5544  ret = 0
5545  unlock :
5546  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
5548  Return ret