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: Thu, 18 Jul 2019 15:09:17 +0200 [thread overview]
Message-ID: <3671b534-ce49-ee1e-77a9-0ce7f5618992@gmail.com> (raw)
In-Reply-To: <e28edf2d-36d3-7f0e-91c1-ded42fe2d688@codethink.co.uk>
On 18/07/2019 13:41, Tom Eccles wrote:
> On 17/07/2019 8:49 pm, Milan Broz wrote:
>> 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.
>
> Attached is a bash script gen_image.sh which should reproduce the issue.
> find_and_corrupt.c should be in the working directory when gen_image.sh is
> run. find_and_corrupt.c corrupts the disk image by simply searching for a
> known string and introducing an error (see the diff outputted by gen_image.sh).
>
> See in particular the error and dmesg sample when reading the corrupted file
> (gen_image.sh:77) and the success when running veritysetup verify
> (gen_image.sh:86).
>
> I have created an issue at https://gitlab.com/cryptsetup/cryptsetup/issues/462
Thanks.
I think I see the problem, and it is actually not FEC related.
Could you please try to manually allocate loop devices in RW mode (not read-only
as we have during automatic loop allocation if mapping image is in file)
over the provided images, and then use these loop device as arguments for
the veritysetup?
Like
# losetup /dev/loop0 data8M.img.corrupt
# losetup /dev/loop1 hash-img
# losetup /dev/loop2 fec-img
and
# veritysetup open --fec-roots 24 --fec-device /dev/loop2 /dev/loop0 test /dev/loop1 15546e6799bb13608c77fa9cb840682a2dec3cfdb948d942ff3487f537966c01 --debug
Does it correct the data now? For me it prints
kernel: device-mapper: verity: sha256 using implementation "sha256-generic"
kernel: fec_decode_bufs: 13 callbacks suppressed
kernel: device-mapper: verity-fec: 7:0: FEC 0: corrected 153 errors
Milan
next prev parent reply other threads:[~2019-07-18 13:09 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
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 [this message]
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=3671b534-ce49-ee1e-77a9-0ce7f5618992@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