···478478 regs->ip = current->utask->xol_vaddr;479479 pre_xol_rip_insn(auprobe, regs, autask);480480481481+ autask->saved_tf = !!(regs->flags & X86_EFLAGS_TF);482482+ regs->flags |= X86_EFLAGS_TF;483483+ if (test_tsk_thread_flag(current, TIF_BLOCKSTEP))484484+ set_task_blockstep(current, false);485485+481486 return 0;482487}483488···608603 if (auprobe->fixups & UPROBE_FIX_CALL)609604 result = adjust_ret_addr(regs->sp, correction);610605606606+ /*607607+ * arch_uprobe_pre_xol() doesn't save the state of TIF_BLOCKSTEP608608+ * so we can get an extra SIGTRAP if we do not clear TF. We need609609+ * to examine the opcode to make it right.610610+ */611611+ if (utask->autask.saved_tf)612612+ send_sig(SIGTRAP, current, 0);613613+ else if (!(auprobe->fixups & UPROBE_FIX_SETF))614614+ regs->flags &= ~X86_EFLAGS_TF;615615+611616 return result;612617}613618···662647 current->thread.trap_nr = utask->autask.saved_trap_nr;663648 handle_riprel_post_xol(auprobe, regs, NULL);664649 instruction_pointer_set(regs, utask->vaddr);650650+651651+ /* clear TF if it was set by us in arch_uprobe_pre_xol() */652652+ if (!utask->autask.saved_tf)653653+ regs->flags &= ~X86_EFLAGS_TF;665654}666655667656/*···694675 if (ret && (regs->flags & X86_EFLAGS_TF))695676 send_sig(SIGTRAP, current, 0);696677 return ret;697697-}698698-699699-void arch_uprobe_enable_step(struct arch_uprobe *auprobe)700700-{701701- struct task_struct *task = current;702702- struct arch_uprobe_task *autask = &task->utask->autask;703703- struct pt_regs *regs = task_pt_regs(task);704704-705705- autask->saved_tf = !!(regs->flags & X86_EFLAGS_TF);706706-707707- regs->flags |= X86_EFLAGS_TF;708708- if (test_tsk_thread_flag(task, TIF_BLOCKSTEP))709709- set_task_blockstep(task, false);710710-}711711-712712-void arch_uprobe_disable_step(struct arch_uprobe *auprobe)713713-{714714- struct task_struct *task = current;715715- struct arch_uprobe_task *autask = &task->utask->autask;716716- bool trapped = (task->utask->state == UTASK_SSTEP_TRAPPED);717717- struct pt_regs *regs = task_pt_regs(task);718718- /*719719- * The state of TIF_BLOCKSTEP was not saved so we can get an extra720720- * SIGTRAP if we do not clear TF. We need to examine the opcode to721721- * make it right.722722- */723723- if (unlikely(trapped)) {724724- if (!autask->saved_tf)725725- regs->flags &= ~X86_EFLAGS_TF;726726- } else {727727- if (autask->saved_tf)728728- send_sig(SIGTRAP, task, 0);729729- else if (!(auprobe->fixups & UPROBE_FIX_SETF))730730- regs->flags &= ~X86_EFLAGS_TF;731731- }732678}
···189189 if (argv[0][0] == '-')190190 is_delete = true;191191 else if (argv[0][0] != 'p') {192192- pr_info("Probe definition must be started with 'p', 'r' or" " '-'.\n");192192+ pr_info("Probe definition must be started with 'p' or '-'.\n");193193 return -EINVAL;194194 }195195