函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\uprobes.c Create Date:2022-07-27 15:08:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

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

函数原型:static void handle_swbp(struct pt_regs *regs)

返回类型:void

参数:

类型参数名称
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  如果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.则返回:handle_trampoline(regs)
2196  uprobe等于find_active_uprobe(bp_vaddr, & is_swbp)
2197  如果非uprobe
2198  如果is_swbp大于0则
2201  否则
2212  返回
2216  instruction_pointer_set(regs, bp_vaddr)
2223  如果此条件成立可能性小(为编译器优化)(!test_bit(Have a copy of original instruction , & flags))则转到:out
2233  smp_rmb()
2236  如果非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则转到:out
2239  如果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)则转到:out
2242  handler_chain(uprobe, regs)
2244  如果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)则转到:out
2247  如果非Prepare to single-step probed instruction out of line. 则返回
2251  out :
2252  put_uprobe(uprobe)
调用者
名称描述
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