Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kprobe_fault_handler

Proto:int kprobe_fault_handler(struct pt_regs *regs, int trapnr)

Type:int

Parameter:

TypeParameterName
struct pt_regs *regs
inttrapnr
1015  cur = kprobe_running() will just return the current_kprobe on this CPU
1016  kcb = get_kprobe_ctlblk()
1018  If Value for the false possibility is greater at compile time(ip == (unsignedlong)copy of the original instruction ) Then
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  If kprobe_status == KPROBE_REENTER Then restore_previous_kprobe(kcb)
1045  Else reset_current_kprobe()
1047  Else if kprobe_status == kprobe_status settings || kprobe_status == KPROBE_HIT_SSDONE Then
1054  kprobes_inc_nmissed_count(cur)
1063  If * ... 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) Then Return 1
1067  Return 0
Caller
NameDescribe
kprobe_page_faultReturns true if kprobes handled the fault