Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Run handler and ask thread to singlestep.* Ensure all non-fatal signals cannot interrupt thread while it singlesteps.

Proto:static void handle_swbp(struct pt_regs *regs)

Type:void

Parameter:

TypeParameterName
struct pt_regs *regs
2190  is_swbp = is_swbp
2192  bp_vaddr = probe_get_swbp_addr - compute address of swbp given post-swbp regs*@regs: Reflects the saved state of the task after it has hit a breakpoint* instruction.* Return the address of the breakpoint instruction.
2193  If bp_vaddr == Current area->vaddr notion assume the trampoline address is always* equal area->vaddr.* Returns -1 in case the xol_area is not allocated. Then Return handle_trampoline(regs)
2196  uprobe = find_active_uprobe(bp_vaddr, & is_swbp)
2197  If Not uprobe Then
2198  If is_swbp > 0 Then
2201  Else
2212  Return
2216  instruction_pointer_set(regs, bp_vaddr)
2223  If Value for the false possibility is greater at compile time(!Determine whether a bit is set(Have a copy of original instruction , & flags)) Then Go to out
2233  smp_rmb()
2236  If Not Allocate a uprobe_task object for the task if if necessary.* Called when the thread hits a breakpoint.* Returns:* - pointer to new uprobe_task on success* - NULL otherwise Then Go to out
2239  If arch_uprobe_ignore( & * The generic code assumes that it has two members of unknown type * owned by the arch-specific code: * insn - copy_insn() saves the original instruction here for * arch_uprobe_analyze_insn(). * ixol - potentially modified instruction to execute out of * l, regs) Then Go to out
2242  handler_chain(uprobe, regs)
2244  If arch_uprobe_skip_sstep( & * The generic code assumes that it has two members of unknown type * owned by the arch-specific code: * insn - copy_insn() saves the original instruction here for * arch_uprobe_analyze_insn(). * ixol - potentially modified instruction to execute out of * l, regs) Then Go to out
2247  If Not Prepare to single-step probed instruction out of line. Then Return
2251  out :
2252  put_uprobe(uprobe)
Caller
NameDescribe
uprobe_notify_resumeOn breakpoint hit, breakpoint notifier sets the TIF_UPROBE flag and* allows the thread to return from interrupt. After that handle_swbp()* sets utask->active_uprobe.* On singlestep exception, singlestep notifier sets the TIF_UPROBE flag