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:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Called after single-stepping. p->addr is the address of the* instruction whose first byte has been replaced by the "int 3"* instruction. To avoid the SMP problems that can occur when we* temporarily put back the original opcode to single-step, we

Proto:static void resume_execution(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb)

Type:void

Parameter:

TypeParameterName
struct kprobe *p
struct pt_regs *regs
struct kprobe_ctlblk *kcb
914  tos = stack_addr(regs)
915  copy_ip = copy of the original instruction
916  orig_ip = location of the probe point
917  insn = copy of the original instruction
920  insn = Skip the prefixes of the instruction.
922  flags &= ~X86_EFLAGS_TF
924  Case insn == 0x9c
925  tos &= ~(X86_EFLAGS_TF | X86_EFLAGS_IF)
926  tos |= kprobe_old_flags
927  Break
928  Case insn == 0xc2
929  Case insn == 0xc3
930  Case insn == 0xca
931  Case insn == 0xcb
932  Case insn == 0xcf
933  Case insn == 0xea
935  stable = false: This instruction type is not boostable.* boostable = true: This instruction has been boosted: we have* added a relative jump after the instruction copy in insn,* so no single-step and fixup are needed (unless there's* a post_handler). = true
936  Go to no_change
937  Case insn == 0xe8
938  tos = orig_ip + tos - copy_ip
939  Break
941  Case insn == 0x9a
942  tos = orig_ip + tos - copy_ip
943  Go to no_change
945  Case insn == 0xff
946  If (insn[1] & 0x30) == 0x10 Then
952  tos = orig_ip + tos - copy_ip
953  Go to no_change
954  Else if (insn[1] & 0x31) == 0x20 || (insn[1] & 0x31) == 0x21 Then
961  Go to no_change
963  Default
964  Break
967  ip += orig_ip - copy_ip
969  no_change :
970  restore_btf()
Caller
NameDescribe
kprobe_debug_handlerInterrupts are disabled on entry as trap1 is an interrupt gate and they* remain disabled throughout this function.