On Mon, Oct 15, 2012 at 06:31:47PM +0100, Dave Martin wrote: > On Sun, Oct 14, 2012 at 09:23:13PM +0200, Rabin Vincent wrote: > > +static int uprobe_trap_handler(struct pt_regs *regs, unsigned int instr) > > +{ > > + unsigned long flags; > > + > > + local_irq_save(flags); > > + if ((instr & 0x0fffffff) == UPROBE_SWBP_INSN) > > Is the check unnecessary here? I think the same comparison will > happen as a result of evaluating the associated undef_hook.
The check is there because this uprobe_trap_handler() is registered for two different undefined instructions: UPROBE_SWBP_INSN (the one which is used to insert the probe) and UPROBE_SS_INSN (the one placed in the XOL area for simulating single-stepping). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/