Re: 2.6.17-rc5-mm2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 01 Jun 2006 14:20:24 +0200
"Jan Beulich" <[email protected]> wrote:

> >Jan, the dwarf2 unwinder apparently fails if we call a NULL function. 
> 
> That is expected behavior, as a NULL program counter (to the unwinder) means end-of-stack-frames.

Is it actually _expected_ that we'll encounter a NULL EIP during the unwind?

Because if it is not, then this is a good indication that the unwind
attempt hasn't worked, so we should fall back to some other approach if we
encounter a NULL at _any_ point in the backtrace, not the start.

Creating too much information is waaaaaaaaaaay better than creating too
little.  (This is a case in point - we're trying to fix a bug here and the
unwinder is preventing that).

In fact, if there's any means at all by which we can detect that something
has gone wrong with the unwind we should fall back.

> It can't do anything
> in that case, so the only solution I see is to either
> - not at all call the unwinder from trap.c if the instruction pointer before the first unwind is not within kernel
> space, or
> - force fall-through to the old logic if the first unwind attempt didn't yield a change to either rIP or rSP (implying
> that in that case there was no unwind information found to start with).
> 
> What do you think?

- Make the code robust and able to detect "unexpected" states at all
  points through the process.  If at the end of the process we see that we
  have encountered an unexpected state,

  - emit a diagnostic so Jan can work out if there's a way to improve
    the unwinder in this situation

  - do a traditional backtrace as well.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux