From: Milan Broz <gmazyland@gmail.com>
To: Tom Eccles <tom.eccles@codethink.co.uk>, dm-crypt@saout.de
Cc: richardmaw@codethink.co.uk
Subject: Re: [dm-crypt] veritysetup forward error correction failure
Date: Wed, 17 Jul 2019 21:49:02 +0200 [thread overview]
Message-ID: <0ce29b38-3f32-d2bc-651e-071075941d43@gmail.com> (raw)
In-Reply-To: <40fa6a57-ac08-1f50-dbce-cadefcbf1ff4@codethink.co.uk>
On 17/07/2019 19:06, Tom Eccles wrote:
> Hello,
>
> I have a question about veritysetup using forward error correction.
>
> I created my dm-verity volume using
>
> veritysetup --check-at-most-once --fec-device /dev/vdc --fec-roots 24 format
> /dev/vdb1 /dev/vdd
>
> Then I introduce a single bit error into /dev/vdb1.
>
> If I then open the dm-verity device using
>
> veritysetup --fec-device /dev/vdc --fec-roots 24 open /dev/vdb1 vroot
> /dev/vdd <hash>
>
> When I mount the device and inspect the corrupted file, the single bit error
> cannot be corrected:
> [ 108.994804] device-mapper: verity-fec: 254:17: FEC 19300352: failed to
> correct: -74
> [ 108.994834] device-mapper: verity: 254:17: data block 273411 is corrupted
>
> However, if I verify the whole device using veritysetup it succeeds:
>
> veritysetup --fec-device /dev/vdc --fec-roots 24 verify /dev/vdb1 /dev/vdd
> <hash>
> Verification failed at position 1119891456.
> Verification of data area failed.
> Found 1 repairable errors with FEC device
>
> So I suspect that I have the wrong flags to veritysetup open. Can anybody
> see where I am going wrong?
Well, the FEC code in userspace and kernel differs, it is quite possible
that there could be some misconfiguration or a bug.
Please be sure you are testing access to the image and not
some cached data in meory - better flush all caches between runs with the command
"echo 3 > /proc/sys/vm/drop_caches".
If you can still reproduce it, please send version of the utility and
kernel (and --debug output as suggested in another mail) and if you have some
data/hash/fec images that can be used to reproduce it, let me know where I can find it.
Thanks,
Milan
next prev parent reply other threads:[~2019-07-17 19:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-17 17:06 [dm-crypt] veritysetup forward error correction failure Tom Eccles
2019-07-17 18:00 ` Michael Kjörling
2019-07-17 19:49 ` Milan Broz [this message]
2019-07-18 9:10 ` Tom Eccles
2019-07-18 9:50 ` Milan Broz
2019-07-18 10:16 ` Tom Eccles
2019-07-18 11:41 ` Tom Eccles
2019-07-18 13:09 ` Milan Broz
2019-07-18 13:49 ` Tom Eccles
2019-07-18 13:59 ` Milan Broz
2019-07-18 14:01 ` Tom Eccles
2019-07-18 13:59 ` Tom Eccles
2019-07-19 7:38 ` Milan Broz
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=0ce29b38-3f32-d2bc-651e-071075941d43@gmail.com \
--to=gmazyland@gmail.com \
--cc=dm-crypt@saout.de \
--cc=richardmaw@codethink.co.uk \
--cc=tom.eccles@codethink.co.uk \
/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