Re: dm-verity setup on loop device
Jasper Surmont <[email protected]>
| Newsgroups | dev.linux.lists.cryptsetup |
|---|---|
| Message-ID | <CAH4tiUtK_faaxTW72Z2Y56j2FG6-VCju9LJPm8JDEUuNjenBYg@mail.gmail.com> |
Hey, Thanks, I didn't realise you also had to use the -r flag with dmsetup. I've got a few more questions concerning dm-verity: - dm-verity itself (not veritysetup or any userspace programs) expects a full merkle tree to be built and the corresponding root hash to be passed as an argument. I saw in the source code that the constructor will verify the root hash using the sig if enabled, but does it also check whether the root hash is correct concerning the hash tree? i.e. Does it traverse the tree to check if the given root hash is correct? I don't think so, but since there is quite a lot of code I might be missing something. - The documentation states: After instantiation, all hashes will be verified on-demand during disk access. This means that the hashes will be verified on every read to any block on the data device right? - If the previous answer is yes; where is the actual verification of the hashes done? I see a lot of functions with '_prefetch' and I know what prefetch is, but it's all a bit confusing to me. Thanks!