函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\kprobes\core.c Create Date:2022-07-27 09:38:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:kprobe_fault_handler

函数原型:int kprobe_fault_handler(struct pt_regs *regs, int trapnr)

返回类型:int

参数:

类型参数名称
struct pt_regs *regs
inttrapnr
1015  cur等于kprobe_running() will just return the current_kprobe on this CPU
1016  kcb等于get_kprobe_ctlblk()
1018  如果此条件成立可能性小(为编译器优化)(ip == (unsignedlong)copy of the original instruction )则
1020  WARN_ON(kprobe_status != KPROBE_HIT_SS && kprobe_status != KPROBE_REENTER)
1029  ip等于 location of the probe point
1035  flags与等于X86_EFLAGS_TF的反
1041  flags或等于kprobe_old_flags
1043  如果kprobe_status恒等于KPROBE_REENTERrestore_previous_kprobe(kcb)
1045  否则reset_current_kprobe()
1047  否则如果kprobe_status恒等于kprobe_status settings kprobe_status恒等于KPROBE_HIT_SSDONE
1054  kprobes_inc_nmissed_count(cur)
1063  如果* ... called if executing addr causes a fault (eg. page fault). * Return 1 if it handled fault, otherwise kernel will see it.* ... called if executing addr causes a fault (eg. page fault). * Return 1 if it handled fault, otherwise kernel will see it.(cur, regs, trapnr)则返回:1
1067  返回:0
调用者
名称描述
do_general_protection
kprobe_page_faultReturns true if kprobes handled the fault