From: "Jan Beulich" <jbeulich@novell.com>
To: "Andi Kleen" <ak@suse.de>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] more sanity checks in Dwarf2 unwinder
Date: Wed, 29 Nov 2006 14:00:41 +0000 [thread overview]
Message-ID: <456DA099.76E4.0078.0@novell.com> (raw)
In-Reply-To: <200611291414.56268.ak@suse.de>
>> while (unwind(info) == 0 && UNW_PC(info)) {
>> n++;
>> oad->ops->address(oad->data, UNW_PC(info));
>> if (arch_unw_user_mode(info))
>> break;
>> + if ((sp & ~(PAGE_SIZE - 1)) == (UNW_SP(info) & ~(PAGE_SIZE - 1))
>> + && sp > UNW_SP(info))
>> + break;
>
>Hmm, but that wouldn't catch the case when the SP is completely
>corrupted for some reason.
>Maybe it would be better to just run a brute force check here like
>the old in_exception_stack(). Similar on x86-64.
Correct. Even though I know Linus disagrees here, I'm not sure
I want to do this, as my ultimate goal would be to eliminate the
hand-crafted linking (which we know got broken a few times on
x86-64, because it's so easy to forget about).
Not the least of the reasons for this is that this increases the
chances of stucks.
>> + if (UNW_PC(frame) % state.codeAlign
>> + || UNW_SP(frame) % sleb128abs(state.dataAlign)
>> + || (pc == UNW_PC(frame) && sp == UNW_SP(frame)))
>> + return -EIO;
>
>Would it be possible to add printks for the EIOs? We want to know
>when dwarf2 is corrupted.
Certainly, will be a follow-up patch.
Jan
next prev parent reply other threads:[~2006-11-29 13:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-29 11:13 [PATCH] more sanity checks in Dwarf2 unwinder Jan Beulich
2006-11-29 13:14 ` Andi Kleen
2006-11-29 14:00 ` Jan Beulich [this message]
2006-12-04 16:20 ` Jan Beulich
2006-12-06 16:41 ` Andi Kleen
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=456DA099.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=ak@suse.de \
--cc=linux-kernel@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.