函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:install_breakpoint

函数原型:static int install_breakpoint(struct uprobe *uprobe, struct mm_struct *mm, struct vm_area_struct *vma, unsigned long vaddr)

返回类型:int

参数:

类型参数名称
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  如果ret则返回:ret
921  first_uprobe等于非test_bit(has uprobes , & Must use atomic bitops to access )
922  如果first_uprobe设置内存位
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  如果非retlear_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  否则如果first_uprobelear_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  返回:ret
调用者
名称描述
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.