Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:install_breakpoint

Proto:static int install_breakpoint(struct uprobe *uprobe, struct mm_struct *mm, struct vm_area_struct *vma, unsigned long vaddr)

Type:int

Parameter:

TypeParameterName
struct uprobe *uprobe
struct mm_struct *mm
struct vm_area_struct *vma
unsigned longvaddr
913  ret = prepare_uprobe(uprobe, File we map to (can be NULL). , mm, vaddr)
914  If ret Then Return ret
921  first_uprobe = Not Determine whether a bit is set(has uprobes , & Must use atomic bitops to access )
922  If first_uprobe Then Atomically set a bit in memory
925  ret = set_swbp - store breakpoint at a given address.*@auprobe: arch specific probepoint information.*@mm: the probed process address space.*@vaddr: the virtual address to insert the opcode.* For mm @mm, store the breakpoint instruction at @vaddr.
926  If Not ret Then lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers).
928  Else if first_uprobe Then lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers).
931  Return ret
Caller
NameDescribe
register_for_each_vma
uprobe_mmapCalled 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.