LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
To: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Abhishek Sagar <sagar.abhishek@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	jkenisto@us.ibm.com, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 0/3][RFC] x86: Catch stray non-kprobe breakpoints
Date: Wed, 30 Jan 2008 09:37:13 +0530	[thread overview]
Message-ID: <20080130040712.GA6762@in.ibm.com> (raw)
In-Reply-To: <479F7EA5.5040201@redhat.com>

On Tue, Jan 29, 2008 at 02:29:41PM -0500, Masami Hiramatsu wrote:
> Abhishek Sagar wrote:
> > On 1/29/08, Masami Hiramatsu <mhiramat@redhat.com> 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.

The reason why kprobes needs to be the first to run is simple: it
doesn't need user intervention and if it isn't the intended recepient of
the breakpoint, it just lets the kernel take over (unlike a debugger,
which would potentially need user attention). Also, if the underlying
instruction itself is a breakpoint, we have the facility in kprobes to
single-step inline so the kernel can take control and notify any other
intended recepient of the underlying breakpoint.

As such, I believe the current situation is fine, has worked fine for
close to 4 years now and doesn't warrant any change.

Ananth

      reply	other threads:[~2008-01-30  4:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-27  9:08 Abhishek Sagar
2008-01-29  6:02 ` Ananth N Mavinakayanahalli
2008-01-29 10:40   ` Abhishek Sagar
2008-01-29 13:18     ` Ananth N Mavinakayanahalli
2008-01-29 17:24       ` Abhishek Sagar
2008-01-29 15:13     ` Masami Hiramatsu
2008-01-29 18:08       ` Abhishek Sagar
2008-01-29 19:29         ` Masami Hiramatsu
2008-01-30  4:07           ` Ananth N Mavinakayanahalli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080130040712.GA6762@in.ibm.com \
    --to=ananth@in.ibm.com \
    --cc=jkenisto@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@redhat.com \
    --cc=mingo@elte.hu \
    --cc=sagar.abhishek@gmail.com \
    --subject='Re: [PATCH 0/3][RFC] x86: Catch stray non-kprobe breakpoints' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).