函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:prepare_uprobe

函数原型:static int prepare_uprobe(struct uprobe *uprobe, struct file *file, struct mm_struct *mm, unsigned long vaddr)

返回类型:int

参数:

类型参数名称
struct uprobe *uprobe
struct file *file
struct mm_struct *mm
unsigned longvaddr
848  ret等于0
850  如果test_bit(Have a copy of original instruction , & flags)则返回:ret
854  lock for writing
855  如果test_bit(Have a copy of original instruction , & flags)则转到:out
858  ret等于copy_insn(uprobe, file)
859  如果ret则转到:out
862  ret等于负Operation is not supported
863  如果s_trap_insn - check if instruction is breakpoint instruction则转到:out
866  ret等于arch_uprobe_analyze_insn - instruction analysis including validity and fixups.*@auprobe: the probepoint information.*@mm: the probed address space.*@addr: virtual address at which to install the probepoint* Return 0 on success or a -ve number on error.
867  如果ret则转到:out
871  BUG_ON((offset & ~PAGE_MASK) + UPROBE_SWBP_INSN_SIZE > PAGE_SIZE)
874  smp_wmb()
875  设置内存位
877  out :
878  lease a write lock
880  返回:ret
调用者
名称描述
install_breakpoint