Re: [PATCH 0/3][RFC] x86: Catch stray non-kprobe breakpoints

From: Masami Hiramatsu
Date: Tue Jan 29 2008 - 14:37:51 EST


Abhishek Sagar wrote:
> On 1/29/08, Masami Hiramatsu <mhiramat@xxxxxxxxxx> wrote:
>> In that case, why don't you just reduce the priority of kprobe_exceptions_nb?
>> Then, the execution path becomes very simple.
>
> Ananth mentioned that the kprobe notifier has to be the first to run.

(Hmm.. I think he has just explained current implementation:))
IMHO, since kprobes itself can not know what the external debugger
wants to do, the highest priority should be reserved for those external tools.

> It still wouldnt allow us to notice breakpoints on places like do_int3
> etc.

If you'd like to do that, my recommendation is to modify IDT directly.

>> I also like to use a debugger for debugging kprobes. that will help us.
>
> Hmm...It would increase the code-path leading upto kprobe_handler.
> That's more territory to be guarded from kprobes.

Sure, all functions of the debugger should be marked __kprobes.
Thus it will be guarded from kprobes.

Thank you,

--
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@xxxxxxxxxx

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/