Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:prepare_uprobe

Proto:static int prepare_uprobe(struct uprobe *uprobe, struct file *file, struct mm_struct *mm, unsigned long vaddr)

Type:int

Parameter:

TypeParameterName
struct uprobe *uprobe
struct file *file
struct mm_struct *mm
unsigned longvaddr
848  ret = 0
850  If Determine whether a bit is set(Have a copy of original instruction , & flags) Then Return ret
854  lock for writing
855  If Determine whether a bit is set(Have a copy of original instruction , & flags) Then Go to out
858  ret = copy_insn(uprobe, file)
859  If ret Then Go to out
862  ret = -Operation is not supported
863  If s_trap_insn - check if instruction is breakpoint instruction Then Go to 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  If ret Then Go to out
871  BUG_ON((offset & ~PAGE_MASK) + UPROBE_SWBP_INSN_SIZE > PAGE_SIZE)
874  smp_wmb()
875  Atomically set a bit in memory
877  out :
878  lease a write lock
880  Return ret
Caller
NameDescribe
install_breakpoint