public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: "Ingo Molnar" <mingo@elte.hu>, "Linus Torvalds" <torvalds@osdl.org>
Cc: "Eric Rannaud" <eric.rannaud@gmail.com>,
	"Andrew Morton" <akpm@osdl.org>, "Andi Kleen" <ak@suse.de>,
	"Chandra Seetharaman" <sekharan@us.ibm.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	<nagar@watson.ibm.com>
Subject: Re: BUG-lockdep and freeze (was: Arrr! Linux 2.6.18)
Date: Wed, 04 Oct 2006 11:21:55 +0200	[thread overview]
Message-ID: <45239953.76E4.0078.0@novell.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0609301406340.3952@g5.osdl.org>

>>> Linus Torvalds <torvalds@osdl.org> 30.09.06 23:11 >>>
>It could - and _should_ dammit! - do some basic sanity tests like "is the 
>thing even in the same stack page"? But nooo... It seems _designed_ to be 
>fragile and broken.

Your opinion. Mine's different, as the unwind directives are specifically
meant to allow changing to a different stack page. Also, there shouldn't
be any potential for corrupt unwind data (once all annotations are
correct, the lack or incorrectness of which I'd rather attribute as bugs
of the old code or, in one case, the compiler) as long as it's being
properly write protected; corruption of the stack should be affecting
the quality of old and new style back traces in similar ways.

>Here's a simple test: if the next stack-slot isn't on the same page, the 
>unwind information is bogus unless you had the IRQ stack-switch signature 
>there. Does the code do that? No. It just assumes that unwind information 
>is complete and perfect.
>
>That's not the kind of code we write in the kernel. In the kernel, we 
>write code that _works_, regardless of the kind of horrible stuff people 
>feed it. That's _doubly_ true for something like a stack frame debugger, 
>which is invoced when there is trouble, and for all we know the stack 
>itself MIGHT BE CORRUPT.
>
>In short, I think the stack unwinder is just _broken_. It has made all the 
>wrong policy decisions - it only works when everything is perfect, yet 
>it's actually meant to be _used_ when somethign bad happened. Doesn't that 
>strike anybody else as a totally flawed design?

Again, a corrupt stack will not allow you getting reliable data out of the
old unwinder either. Even worse when you consider a stack overflow and
your request for range checks (or pointers into the stack) - you might not
get a stack trace then at all.

Jan

  parent reply	other threads:[~2006-10-04  9:20 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-30 19:20 BUG-lockdep and freeze (was: Arrr! Linux 2.6.18) Eric Rannaud
2006-09-30 19:49 ` Peter Zijlstra
2006-09-30 20:23   ` Linus Torvalds
2006-09-30 20:57   ` Eric Rannaud
2006-09-30 19:54 ` Linus Torvalds
2006-09-30 20:21   ` Al Viro
2006-09-30 20:28     ` Linus Torvalds
2006-09-30 20:30   ` Andi Kleen
2006-09-30 20:47     ` Linus Torvalds
2006-09-30 20:49       ` Ingo Molnar
2006-09-30 21:11         ` Linus Torvalds
2006-09-30 21:25           ` Ingo Molnar
2006-09-30 21:57           ` Andi Kleen
2006-09-30 22:09             ` BUG-lockdep and freeze (was: Arrr! Linux 2.6.18) II Andi Kleen
2006-09-30 22:19               ` Eric Rannaud
2006-09-30 22:24                 ` Andi Kleen
2006-09-30 22:54             ` BUG-lockdep and freeze (was: Arrr! Linux 2.6.18) Linus Torvalds
2006-10-04  9:21           ` Jan Beulich [this message]
2006-10-04 15:12             ` Linus Torvalds
2006-09-30 21:43     ` Eric Rannaud
2006-09-30 22:03       ` Andi Kleen
2006-09-30 21:56     ` Linus Torvalds
2006-09-30 22:02       ` Andi Kleen
2006-09-30 22:10         ` Ingo Molnar
2006-09-30 22:23           ` Andi Kleen
2006-09-30 22:55         ` Linus Torvalds
2006-09-30 22:59           ` Linus Torvalds
2006-09-30 23:56           ` Andi Kleen
2006-10-01  0:25             ` Linus Torvalds
2006-10-01  0:51               ` Linus Torvalds
2006-10-01  9:27                 ` Andi Kleen
2006-10-04  9:25     ` Jan Beulich
2006-10-04 10:52       ` Andi Kleen
2006-10-04 11:58         ` Jan Beulich
2006-10-04 12:03           ` Andi Kleen
2006-10-04 12:10             ` Jan Beulich
2006-09-30 20:43   ` Linus Torvalds
2006-10-04  9:15   ` Jan Beulich
2006-09-30 20:13 ` Andrew Morton
2006-09-30 20:52   ` Eric Rannaud
2006-09-30 21:04     ` Andrew Morton
2006-09-30 22:00       ` Eric Rannaud
2006-09-30 22:05         ` Ingo Molnar
2006-10-01  0:59           ` Eric Rannaud

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=45239953.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=eric.rannaud@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nagar@watson.ibm.com \
    --cc=sekharan@us.ibm.com \
    --cc=torvalds@osdl.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