LKML Archive on
help / color / mirror / Atom feed
From: "Abhishek Sagar" <>
To: "Masami Hiramatsu" <>
Cc: LKML <>,,,
	"Ingo Molnar" <>
Subject: Re: [PATCH 3/3] x86: WARN_ON breakpoints from .kprobes.text section
Date: Mon, 28 Jan 2008 16:46:41 +0530	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 1/28/08, Masami Hiramatsu <> wrote:
> Thank you for explanation, I hope I can understand it.
> Even if it causes a trap recursively, it could be checked (and ignored) by
> longjump_break_handler(), and passed to the debugger correctly.

Yes, all non-kprobe breakpoints are left to the kernel to be handled.
The objective here is to intercept the trap handling of a certain
category of such breakpoints and emit a warning. The premise being
that .kprobes.text section is a logical breakpoint-free zone.

> Please consider that someone expands jprobe(jprobe2) which uses
> jprobe_return2() instead of jprobe_return(), how would you handle it?

By a simple modification of is_jprobe_bkpt() (defined in patch #2 of
this series).

> Current kprobes provides an opportunity to those external probe frameworks
> for checking it by themselves.

Could you clarirfy this with some example. For now I'm assuming that
by external probe frameworks you mean kernel modules using kprobes. If
they embed breakpoints in their handlers, then they will simply not be
caught by this check because thay cannot lie in the .kprobes.text

> By the way, external kernel debugger knows how kprobe (and exception notifier)
> works, so I think it can fetch his exception before kprobes does (by tweaking
> notifier chain, etc).
> (I hope all external kernel debuggers take care of it. :-))

I would image that from a code correctness's point of view it
shouldn't matter. In any case, nothing can be done if the kprobe
exception notifier is circumvented.

> Masami Hiramatsu
> Software Engineer
> Hitachi Computer Products (America) Inc.
> Software Solutions Division
> e-mail:

Abhishek Sagar

  reply	other threads:[~2008-01-28 11:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-27  9:09 Abhishek Sagar
2008-01-27 14:28 ` Masami Hiramatsu
2008-01-27 15:33   ` Abhishek Sagar
2008-01-27 22:08     ` Masami Hiramatsu
2008-01-28 11:16       ` Abhishek Sagar [this message]
2008-01-28 17:22         ` Masami Hiramatsu

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:

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

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH 3/3] x86: WARN_ON breakpoints from .kprobes.text section' \

* 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).