Re: [PATCH v2 0/2] dm verity: add support for error correction

From: Sami Tolvanen
Date: Tue Dec 08 2015 - 05:18:28 EST


On Mon, Dec 07, 2015 at 02:07:43PM -0500, Mike Snitzer wrote:
> I'm not seeing any verification of the metadata in fec_read_parity() --
> so it would seem that corrupt RS blocks would result in -EBADMSG being
> returned from decode_rs8() (by virtue of incorrect parity being passed
> to decode_rs8).
>
> Sami (or others) am I right?

Yes, decode_rs8 failing with -EBADMSG is one option. There are also two
other cases:

1) If the parity data is only partially corrupted, it may still be
possible to correct errors, provided that the actual data isn't
too severely corrupted.

2) If there's too much corruption for Reed-Solomon to detect, it's
also possible that decode_rs8 just returns bogus data, which we
will catch when verifying the hash again. This is why combining
error correction with integrity checking is essential.

In other words, the worst case is that we cannot correct errors for the
blocks covered by the corrupted parity data.

Sami
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/