public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "mjw at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sources.redhat.com
Subject: [Bug uprobes/10836] uprobes-provided pt_regs* are unreliable
Date: Wed, 28 Oct 2009 12:29:00 -0000	[thread overview]
Message-ID: <20091028122941.13725.qmail@sourceware.org> (raw)
In-Reply-To: <20091023162529.10836.fche@redhat.com>


------- Additional Comments From mjw at redhat dot com  2009-10-28 12:29 -------
This is also a problem for the dwarf based unwinder.

In runtime/unwind.c we feed unwind_frame() a pt_regs struct describing the
current state of the registers (plus some unwind tables, stp_module, etc.) Then
that uses its internal unwind_state regs stack to keep track of what is going to
happen with the pt_regs given the cfa ops found in the table. And when it is all
processed it spits out a new pt_regs struct describing the state of one unwind
step. In runtime/stack-<arch>.c we are feeding unwind_frame() initially the
pt_regs given by either kprobes or uprobes (arch_unw_init_frame_info(&info,
regs)). But the uprobes pt_regs are the "wrong kind" for user space although the
do work most of the time.

This could be fixed without having to change much by having the "loony concept"
of synthesized pt_regs without having to change too much of this code. Otherwise
we would need to make arch_unw_init_frame_info() smarter and detect we want the
user space registers (which we know in stp_stack_print because tsk != NULL) and
use the appropriate regsets to instantiate the unwind_info->regs.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10836

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

  parent reply	other threads:[~2009-10-28 12:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-23 16:25 [Bug uprobes/10836] New: " fche at redhat dot com
2009-10-27 11:44 ` [Bug uprobes/10836] " srikar at linux dot vnet dot ibm dot com
2009-10-27 11:45 ` srikar at linux dot vnet dot ibm dot com
2009-10-27 12:27 ` fche at redhat dot com
2009-10-27 18:40 ` roland at gnu dot org
2009-10-27 19:17 ` fche at redhat dot com
2009-10-28 12:29 ` mjw at redhat dot com [this message]
2009-10-28 16:53 ` jkenisto at us dot ibm dot com
2009-10-28 16:56 ` fche at redhat dot com
2009-10-28 16:59 ` fche at redhat dot com
2009-10-28 18:22 ` roland at gnu dot org
2009-10-29  6:20 ` ananth at in dot ibm dot com
2009-10-29 14:29 ` fche at redhat dot com
2009-11-05 13:57 ` fche at redhat dot com
2009-11-30 20:36 ` fche at redhat dot com

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=20091028122941.13725.qmail@sourceware.org \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).