Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Called from mmap_region/vma_adjust with mm->mmap_sem acquired.* Currently we ignore all errors and always return 0, the callers* can't handle the failure anyway.

Proto:int uprobe_mmap(struct vm_area_struct *vma)

Type:int

Parameter:

TypeParameterName
struct vm_area_struct *vma
1369  If allows us to skip the uprobe_mmap if there are no uprobe events active* at this time. Probably a fine grained per inode count is better?() Then Return 0
1372  If File we map to (can be NULL). && (Flags, see mm.h. & (VM_WRITE | VM_SHARED)) == VM_WRITE && Determine whether a bit is set(has uprobes , & flags) Then @vma contains reference counter, not the probed instruction.
1377  If Not valid_vma: Verify if the specified vma is an executable vma* Relax restrictions while unregistering: vm_flags might have* changed after breakpoint was inserted Then Return 0
1380  inode = file_inode(File we map to (can be NULL). )
1381  If Not inode Then Return 0
1384  mutex_lock(uprobes_mmap_hash(inode))
1385  For a given range in vma, build a list of probes that need to be inserted.
1392  If Not fatal_signal_pending(current process) && filter_chain(uprobe, UPROBE_FILTER_MMAP, The address space we belong to. ) Then
1394  vaddr = offset_to_vaddr(vma, offset)
1395  install_breakpoint(uprobe, The address space we belong to. , vma, vaddr)
1397  put_uprobe(uprobe)
1399  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1401  Return 0
Caller
NameDescribe
__vma_adjustWe cannot adjust vm_start, vm_end, vm_pgoff fields of a vma that* is already present in an i_mmap tree without adjusting the tree.* The following helper function should be used when such adjustments* are necessary
mmap_region