summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-verity.h
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2015-12-03 14:26:31 +0000
committerMike Snitzer <snitzer@redhat.com>2015-12-10 10:39:03 -0500
commit0cc37c2df4fa0aa702f9662edce4b7ce12c86b7a (patch)
treece34d33da52e65c3907034f294af01f7dd96ad0b /drivers/md/dm-verity.h
parenta739ff3f543afbb4a041c16cd0182c8e8d366e70 (diff)
downloadlinux-0cc37c2df4fa0aa702f9662edce4b7ce12c86b7a.tar.gz
linux-0cc37c2df4fa0aa702f9662edce4b7ce12c86b7a.tar.bz2
linux-0cc37c2df4fa0aa702f9662edce4b7ce12c86b7a.zip
dm verity: add ignore_zero_blocks feature
If ignore_zero_blocks is enabled dm-verity will return zeroes for blocks matching a zero hash without validating the content. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-verity.h')
-rw-r--r--drivers/md/dm-verity.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-verity.h b/drivers/md/dm-verity.h
index 8e853722f6c6..fb419f422d73 100644
--- a/drivers/md/dm-verity.h
+++ b/drivers/md/dm-verity.h
@@ -40,6 +40,7 @@ struct dm_verity {
struct crypto_shash *tfm;
u8 *root_digest; /* digest of the root block */
u8 *salt; /* salt: its size is salt_size */
+ u8 *zero_digest; /* digest for a zero block */
unsigned salt_size;
sector_t data_start; /* data offset in 512-byte sectors */
sector_t hash_start; /* hash start in blocks */
@@ -123,6 +124,6 @@ extern int verity_hash(struct dm_verity *v, struct shash_desc *desc,
const u8 *data, size_t len, u8 *digest);
extern int verity_hash_for_block(struct dm_verity *v, struct dm_verity_io *io,
- sector_t block, u8 *digest);
+ sector_t block, u8 *digest, bool *is_zero);
#endif /* DM_VERITY_H */