mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, akpm@linux-foundation.org
Subject: Re: Make the 32 bit Frame Pointer backtracer fall back to traditional
Date: Thu, 10 Jan 2008 08:49:07 -0800	[thread overview]
Message-ID: <20080110084907.37279d36@laptopd505.fenrus.org> (raw)
In-Reply-To: <alpine.LFD.1.00.0801100816450.3148@woody.linux-foundation.org>

On Thu, 10 Jan 2008 08:36:57 -0800 (PST)
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> 
> 
> On Wed, 9 Jan 2008, Arjan van de Ven wrote:
> >
> > +	if (valid_stack_ptr(tinfo, frame, sizeof(*frame)))
> > +		while (valid_stack_ptr(tinfo, frame,
> > sizeof(*frame))) {
> 
> Why?
> 
> Why not just make this something like the appended instead?
> 
> This is *totally* untested, but the basic notion is very simple:
> start off using the frame pointer until it is no longer valid (for
> any reason - whether the return address is corrupt, or the next frame
> info is bad), and update the stack pointer a you go.
> 
> When we've run out of frame pointers, we then scan any remaining
> stack the oldfashioned way, regardless of what happened. No
> unnecessary conditionals that will just mean that we don't show
> enough of the stack if *part* of it is corrupt.
> 
> The code is simpler and more robust (assuming it works - as
> mentioned, I didn't actually test it, so there may be some stupid
> thinko there).
> 

there's still a bug in it (not updating EBP) and I need to check how 
it reacts if you have 2 stacks, and you're at the end of the first stack,
and EBP now jumps to the second stack (correctly).

Anyway I'll test this after (or maybe during) my meeting, and fix the EBP return bug
and see how to deal with the 2 stack issue

  reply	other threads:[~2008-01-10 16:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-10  6:05 Arjan van de Ven
2008-01-10  6:21 ` Harvey Harrison
2008-01-10 12:46   ` Ingo Molnar
2008-01-10 15:15     ` Arjan van de Ven
2008-01-10  6:55 ` Ingo Molnar
2008-01-10 16:36 ` Linus Torvalds
2008-01-10 16:49   ` Arjan van de Ven [this message]
2008-01-11  4:35   ` Arjan van de Ven
2008-01-11 11:54     ` Olaf Dietsche
2008-01-11 19:41     ` Linus Torvalds
2008-01-11 19:56       ` Arjan van de Ven
2008-01-11 22:01       ` Theodore Tso

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=20080110084907.37279d36@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®