On Tue, Sep 27, 2016 at 08:33:25PM +0530, Pratyush Anand wrote: > On Tuesday 27 September 2016 07:21 PM, Catalin Marinas wrote: > >There is also the is_trap_at_addr() function which uses is_trap_insn(). > >I haven't checked the call paths here, are there any implications if > >is_trap_insn() always returns false? > > I had looked into it and also tested that a tracepoint at an application > having a same instruction as that of "uprobe break instruction" ie "BRK > #0x5" is rejected. So, I think a false positive return from is_tarp_insn() > is still OK.
Looking at handle_swbp(), if we hit a breakpoint for which we don't have a valid uprobe, this function currently sends a SIGTRAP. But if is_trap_insn() returns false always, is_trap_at_addr() would return 0 in this case so the SIGTRAP is never issued. -- Catalin