public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: jmerkey@wolfmountaingroup.com
To: ananth@in.ibm.com
Cc: jmerkey@wolfmountaingroup.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.27-rc1-git5 2/26] mdb: correct kprobes int3 trap
Date: Wed, 6 Aug 2008 07:36:40 -0600 (MDT)	[thread overview]
Message-ID: <44718.166.70.238.45.1218029800.squirrel@webmail.wolfmountaingroup.com> (raw)
In-Reply-To: <20080806084014.GA3777@in.ibm.com>

> On Tue, Aug 05, 2008 at 12:26:35AM -0600, jmerkey@wolfmountaingroup.com
> wrote:
> ...
>
>> @@ -850,6 +871,10 @@
>>  #ifdef CONFIG_KPROBES
>>  void __kprobes do_int3(struct pt_regs *regs, long error_code)
>>  {
>> +#ifdef	CONFIG_MDB
>> +        if (mdb(BREAKPOINT_EXCEPTION, error_code, regs))
>> +           return;
>> +#endif // CONFIG_MDB
>>  	trace_hardirqs_fixup();
>>
>>  	if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP)
>
> Kprobes needs to be the first consumer of these exceptions (via
> notify_die); if the exception was due to a kprobe, it does its thing
> without requiring any user intervention. Here, for example, you can get
> into mdb for a kprobe breakpoint hit.
>
> Please move the mdb hooks to after kprobes has been notified. Better
> still, integrate mdb to use the notify_die infrastructure and use a
> lower priority than what kprobes does for it.
>
> Ananth
>

I have removed these hooks already and converted to debugger to use
notify_die -- finished it last night as per Andi's suggestions.  This code
section has already been removed from reboot.c and traps_XX.c.

I'll post the new patch with the module based debugger later today.

Jeff


  reply	other threads:[~2008-08-06 13:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-05  6:26 [PATCH 2.6.27-rc1-git5 2/26] mdb: correct kprobes int3 trap jmerkey
2008-08-05 15:33 ` Masami Hiramatsu
2008-08-05 15:28   ` jmerkey
2008-08-06  8:15     ` Stefan Richter
     [not found]       ` <44714.166.70.238.45.1218029717.squirrel@webmail.wolfmountaingroup.com>
2008-08-06 16:32         ` Stefan Richter
2008-08-06 16:51     ` Masami Hiramatsu
2008-08-06 19:03       ` jmerkey
2008-08-06  8:40 ` Ananth N Mavinakayanahalli
2008-08-06 13:36   ` jmerkey [this message]
2008-08-06 12:21 ` Abhishek Sagar

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=44718.166.70.238.45.1218029800.squirrel@webmail.wolfmountaingroup.com \
    --to=jmerkey@wolfmountaingroup.com \
    --cc=ananth@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox