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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <ananth@...>
Cc: LKML <linux-kernel@...>, <jkenisto@...>, Masami Hiramatsu <mhiramat@...>, Ingo Molnar <mingo@...>
Date: Tuesday, January 29, 2008 - 6:40 am

On 1/29/08, Ananth N Mavinakayanahalli <ananth@in.ibm.com> wrote:

May be I'm completely off the mark here, but shouldn't a small subset
of this section simply be 'breakpoint-free' rather than 'kprobe-free'?
Placing a breakpoint on kprobe_handler (say) can loop into a recursive
trap without allowing the debugger's notifier chain to be invoked. I'm
assuming that non-kprobe exception notifiers may (or even should) run
after kprobe's notifier callback (kprobe_exceptions_notify).


This will still happen. It doesn't stop non-kprobe breakpoints from
being handled, wherever they may be.


Here's what seems to be happening currently:

int3 (non-kprobe) -> do_int3 ->kprobe_exceptions_notify ->
kprobe_handler (passes the buck to the kernel) -> non-krpobe/debugger
exception handler.

Here's what the patch will do:

int3 (non-kprobe) -> do_int3 ->kprobe_exceptions_notify ->
WARN_ON/kprobe_handler -> non-kprobe/debugger exception handler.

The WARN_ON (and not a BUG_ON) will be hit iff:
(in_kprobes_functions(addr) && !is_jprobe_bkpt(addr))


I hope I've understood the point you were making, or at least came close :-).

--
Thanks,
Abhishek
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/3][RFC] x86: Catch stray non-kprobe breakpoints, Abhishek Sagar, (Sun Jan 27, 5:08 am)
Re: [PATCH 0/3][RFC] x86: Catch stray non-kprobe breakpoints, Ananth N Mavinakayanahalli..., (Tue Jan 29, 2:02 am)
Re: [PATCH 0/3][RFC] x86: Catch stray non-kprobe breakpoints, Abhishek Sagar, (Tue Jan 29, 6:40 am)
Re: [PATCH 0/3][RFC] x86: Catch stray non-kprobe breakpoints, Masami Hiramatsu, (Tue Jan 29, 11:13 am)
Re: [PATCH 0/3][RFC] x86: Catch stray non-kprobe breakpoints, Masami Hiramatsu, (Tue Jan 29, 3:29 pm)
Re: [PATCH 0/3][RFC] x86: Catch stray non-kprobe breakpoints, Ananth N Mavinakayanahalli..., (Wed Jan 30, 12:07 am)
Re: [PATCH 0/3][RFC] x86: Catch stray non-kprobe breakpoints, Ananth N Mavinakayanahalli..., (Tue Jan 29, 9:18 am)