Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\uprobes.c Create Date:2022-07-28 08:47:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long addr)

Type:int

Parameter:

TypeParameterName
struct arch_uprobe *auprobe
struct mm_struct *mm
unsigned longaddr
853  fix_ip_or_call = Adjust IP back to vicinity of actual insn
856  ret = uprobe_init_insn(auprobe, & insn, is_64bit_mm(mm))
857  If ret Then Return ret
860  ret = Returns -ENOSYS if branch_xol_ops doesn't handle this insn
861  If ret != -ENOSYS Then Return ret
864  ret = Returns -ENOSYS if push_xol_ops doesn't handle this insn
865  If ret != -ENOSYS Then Return ret
873  Case Adaptations for mhiramat x86 decoder v14. ( & insn) == 0x9d
874  fixups |= Instruction will modify TF, don't change it
875  Break
876  Case Adaptations for mhiramat x86 decoder v14. ( & insn) == 0xc3
877  Case Adaptations for mhiramat x86 decoder v14. ( & insn) == 0xcb
878  Case Adaptations for mhiramat x86 decoder v14. ( & insn) == 0xc2
879  Case Adaptations for mhiramat x86 decoder v14. ( & insn) == 0xca
880  Case Adaptations for mhiramat x86 decoder v14. ( & insn) == 0xea
881  fix_ip_or_call = 0
882  Break
883  Case Adaptations for mhiramat x86 decoder v14. ( & insn) == 0x9a
884  fix_ip_or_call = Adjust the return address of a call insn
885  Break
886  Case Adaptations for mhiramat x86 decoder v14. ( & insn) == 0xff
888  Case MODRM_REG( & insn) == 2
888  Case MODRM_REG( & insn) == 3
890  Break
891  Case MODRM_REG( & insn) == 4
891  Case MODRM_REG( & insn) == 5
892  fix_ip_or_call = 0
893  Break
896  Default
897  If arch_uprobe->insn doesn't use rip-relative addressing, return* immediately. Otherwise, rewrite the instruction so that it accesses* its memory operand indirectly through a scratch register. Set* defparam->fixups accordingly
900  ilen = length
901  fixups |= fix_ip_or_call
903  ops = default_xol_ops
904  Return 0