From: Roland Dreier <rdreier@cisco.com>
To: Dave Jones <davej@redhat.com>
Cc: Avi Kivity <avi@argo.co.il>, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: discriminate single bit error hardware failure from slab corruption.
Date: Thu, 02 Feb 2006 20:41:26 -0800 [thread overview]
Message-ID: <ada3bj1xde1.fsf@cisco.com> (raw)
In-Reply-To: <20060203042035.GF10209@redhat.com> (Dave Jones's message of "Thu, 2 Feb 2006 23:20:35 -0500")
Dave> Hmm, I made a mistake in my maths somewhere, and some of
Dave> those values are incorrect, so having the compiler do the
Dave> work would have stopped me screwing up, but once the correct
Dave> values are used, I doubt there's ever a really compelling
Dave> reason to change the slab poison pattern.
But Avi is still correct about false positives. For example, if
something stomps on the slab poison and leaves it as
e0 08 03 00
then that will add up to eb and still trigger your message, even
though it's far from a single bit error.
Maybe making the loop be something like
unsigned char total = 0, bad_count = 0;
printk(KERN_ERR "%03x:", offset);
for (i = 0; i < limit; i++) {
if (data[offset+i] != POISON_FREE) {
total += data[offset+i];
++bad_count;
}
printk(" %02x", (unsigned char)data[offset + i]);
}
and then you can put
if (bad_count == 1)
before the switch statement.
I have to admit that Avi's code seems clearer to me too, though.
- R.
next prev parent reply other threads:[~2006-02-03 4:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-02 19:24 discriminate single bit error hardware failure from slab corruption Dave Jones
2006-02-02 19:28 ` Randy.Dunlap
2006-02-02 19:38 ` Jesper Juhl
2006-02-02 19:53 ` Pekka Enberg
2006-02-03 0:44 ` Avi Kivity
2006-02-03 1:46 ` Dave Jones
2006-02-03 2:05 ` Avi Kivity
2006-02-03 4:20 ` Dave Jones
2006-02-03 4:41 ` Roland Dreier [this message]
2006-02-03 5:03 ` Dave Jones
2006-02-03 14:12 ` Jan Engelhardt
2006-02-03 11:05 ` Olivier Galibert
2006-02-06 20:19 ` Pavel Machek
2006-02-03 14:09 ` Jan Engelhardt
-- strict thread matches above, loose matches on Subject: below --
2006-02-03 9:25 linux
2006-02-03 14:14 ` Jan Engelhardt
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=ada3bj1xde1.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=avi@argo.co.il \
--cc=davej@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox