lkml.org 
[lkml]   [2006]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: discriminate single bit error hardware failure from slab corruption.
From
Date
    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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-03 05:44    [W:0.106 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site