From: "Alan D. Brunelle" <Alan.Brunelle@hp.com>
To: "Lynch, Rusty" <rusty.lynch@intel.com>
Cc: Keith Owens <kaos@sgi.com>,
"Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>,
akpm@osdl.org, "Luck, Tony" <tony.luck@intel.com>,
"Seth, Rohit" <rohit.seth@intel.com>,
prasanna@in.ibm.com, ananth@in.ibm.com,
systemtap@sources.redhat.com, linux-ia64@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [patch 1/4] Kprobes support for IA64
Date: Wed, 25 May 2005 10:00:18 -0400 [thread overview]
Message-ID: <429484F2.8080401@hp.com> (raw)
In-Reply-To: <032EB457B9DBC540BFB1B7B519C78B0E07340747@orsmsx404.amr.corp.intel.com>
Isn't the real issue here that if kprobes attempts to put in a 'break
0x80200' into a B-slot that it instead becomes a 'break.b 0' -- as the
break.b does not accept an immediate value? Which probably means that
either kprobes (a) should not rely on the immediate value of the break
at all (always put in an immediate value of 0), or (b) kprobes should
not allow a probe on a B-slot of an instruction bundle.
Kprobes does have the two cases covered in traps.c (case 0 - when a
B-slot break is used, and case 0x80200 for a non-B-slot break). But this
doesn't seem very clean. (If it was decided that one should not overload
the break 0 case, and instead use a uniquely defined break number, then
it fails on a B-slot probe. If it is OK to overload the break 0 case,
why have another break number at all?)
I started doing a port of kprobes, ran into this, and decided to try a
different mechanism that replaced the whole instruction bundle - so that
I could format the instruction bundle to allow a break instruction with
an immediate value (and thus uniquely identify KPROBE breaks).
[Basically put the break in the 1st slot (all the time), and then go
execute the original instruction *bundle* elsewhere when the break is hit.]
PS. I don't see the 0x80300 defined __IA64_BREAK_JPROBE being used
anywhere...
Alan D. Brunelle
Hewlett-Packard
Lynch, Rusty wrote:
>>From: Keith Owens [mailto:kaos@sgi.com]
>>Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> wrote:
>>
>>
>>>This patch adds the kdebug die notification mechanism needed by
>>>
>>>
>Kprobes.
>
>
>>> case 0: /* unknown error (used by GCC for
>>>
>>>
>__builtin_abort()) */
>
>
>>>+ if (notify_die(DIE_BREAK, "kprobe", regs, break_num,
>>>
>>>
>>TRAP_BRKPT, SIGTRAP)
>>
>>
>>>+ == NOTIFY_STOP) {
>>>+ return;
>>>+ }
>>> die_if_kernel("bugcheck!", regs, break_num);
>>> sig = SIGILL; code = ILL_ILLOPC;
>>> break;
>>>
>>>
>>Nit pick. Any break instruction in a B slot will set break_num 0, so
>>you cannot tell if the break was inserted by kprobe or by another
>>debugger. Setting the string to "kprobe" is misleading here, change it
>>to "break 0".
>>
>>
>
>Good catch. We'll update the informational string.
>
> --rusty
>-
>To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
next prev parent reply other threads:[~2005-05-25 13:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-24 16:20 [patch 1/4] Kprobes support for IA64 Lynch, Rusty
2005-05-25 14:00 ` Alan D. Brunelle [this message]
2005-05-26 0:49 ` Keith Owens
2005-05-26 1:06 ` Keshavamurthy Anil S
2005-05-26 19:40 ` David Mosberger
-- strict thread matches above, loose matches on Subject: below --
2005-05-25 16:46 Lynch, Rusty
2005-05-23 15:39 [patch 0/4] " Anil S Keshavamurthy
2005-05-23 15:39 ` [patch 1/4] " Anil S Keshavamurthy
2005-05-24 5:40 ` Keith Owens
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=429484F2.8080401@hp.com \
--to=alan.brunelle@hp.com \
--cc=akpm@osdl.org \
--cc=ananth@in.ibm.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=kaos@sgi.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prasanna@in.ibm.com \
--cc=rohit.seth@intel.com \
--cc=rusty.lynch@intel.com \
--cc=systemtap@sources.redhat.com \
--cc=tony.luck@intel.com \
/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