All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] sh: Check for return_to_handler when unwinding the stack
Date: Mon, 26 Oct 2009 02:02:23 +0000	[thread overview]
Message-ID: <20091026020222.GD6108@linux-sh.org> (raw)
In-Reply-To: <1256410617-16860-1-git-send-email-matt@console-pimps.org>

On Sat, Oct 24, 2009 at 07:56:57PM +0100, Matt Fleming wrote:
> When CONFIG_FUNCTION_GRAPH_TRACER is enabled the function graph tracer
> may patch return addresses on the stack with the address of
> return_to_handler(). This really confuses the DWARF unwinder because it
> will try find the caller of return_to_handler(), not the caller of the
> real return address.
> 
> So teach the DWARF unwinder how to find the real return address whenever
> it encounters return_to_handler().
> 
> This patch does not cope very well when multiple return addresses on the
> stack have been patched. To make it work properly it would require state
> to track how many return_to_handler()'s have been seen so that we'd know
> where to look in current->curr_ret_stack[]. So for now, instead of
> trying to handle this, just moan if more than one return address on the
> stack has been patched.
> 
> Signed-off-by: Matt Fleming <matt@console-pimps.org>

Applied, thanks.

      reply	other threads:[~2009-10-26  2:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-24 18:56 [PATCH] sh: Check for return_to_handler when unwinding the stack Matt Fleming
2009-10-26  2:02 ` Paul Mundt [this message]

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=20091026020222.GD6108@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=linux-sh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.