From: Andi Kleen <ak@suse.de>
To: "Lynch, Rusty" <rusty.lynch@intel.com>
Cc: Andi Kleen <ak@suse.de>,
akpm@osdl.org, linux-kernel@vger.kernel.org,
Vara Prasad <prasadav@us.ibm.com>, Hien Nguyen <hien@us.ibm.com>,
Prasanna S Panchamukhi <prasanna@in.ibm.com>,
Jim Keniston <jkenisto@us.ibm.com>
Subject: Re: [patch] x86_64 specific function return probes
Date: Fri, 3 Jun 2005 18:45:51 +0200 [thread overview]
Message-ID: <20050603164551.GS23831@wotan.suse.de> (raw)
In-Reply-To: <032EB457B9DBC540BFB1B7B519C78B0E07499DE4@orsmsx404.amr.corp.intel.com>
On Fri, Jun 03, 2005 at 09:40:26AM -0700, Lynch, Rusty wrote:
> From: Andi Kleen [mailto:ak@suse.de]
> >On Thu, Jun 02, 2005 at 01:58:50PM -0700, Rusty Lynch wrote:
> >> The following patch adds the x86_64 architecture specific
> implementation
> >
> >[....]
> >
> >Thanks for the long description.
> >
> >but...
> >
> >> +struct task_struct *arch_get_kprobe_task(void *ptr)
> >> +{
> >> + return ((struct thread_info *) (((unsigned long) ptr) &
> >> + (~(THREAD_SIZE -1))))->task;
> >> +}
> >
> >and
> >
> >
> >> + tsk = arch_get_kprobe_task(sara);
> >
> >
> >This is still wrong when the code is not executing on the process
> >stack, but on a interrupt/Exception stack. Any reason you cannot
> >just use current here?
> >
> >-Andi
>
> Ah... you are talking about if someone registers a return probe on
> something like an interrupt handler, right?
Yes.
>
> I was under the impression that I could not always count on the current
> I get from interrupt context to map to the current seen by the target
> function (that triggers the breakpoint.) It sounds like an invalid
> assumption lead to some extra complexity that isn't correct for all
> cases.
It is an invalid assumption, current works in all contexts. Except
if your GS is broken, but that should only happen when the kernel
is already very crashed.
-Andi
next prev parent reply other threads:[~2005-06-03 16:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-03 16:40 Lynch, Rusty
2005-06-03 16:45 ` Andi Kleen [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-06-03 16:54 Lynch, Rusty
2005-06-03 16:05 Lynch, Rusty
2005-06-02 20:58 Rusty Lynch
2005-06-03 15:45 ` Andi Kleen
2005-06-02 17:35 Lynch, Rusty
2005-06-03 5:07 ` Andrew Morton
2005-06-02 16:09 Rusty Lynch
2005-06-02 17:31 ` Andi Kleen
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=20050603164551.GS23831@wotan.suse.de \
--to=ak@suse.de \
--cc=akpm@osdl.org \
--cc=hien@us.ibm.com \
--cc=jkenisto@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=prasadav@us.ibm.com \
--cc=prasanna@in.ibm.com \
--cc=rusty.lynch@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
Powered by JetHome