]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
dm verity: fix biovecs hash calculation regression
authorMilan Broz <gmazyland@gmail.com>
Mon, 14 Apr 2014 20:02:30 +0000 (22:02 +0200)
committerMike Snitzer <snitzer@redhat.com>
Tue, 15 Apr 2014 16:19:24 +0000 (12:19 -0400)
commit3a7745215e7f73a5c7d9bcdc50661a55b39052a3
treefd2f52eb17ae4aca928511c2e713ef425cb3be95
parentb10ebd34cccae1b431caf1be54919aede2be7cbe
dm verity: fix biovecs hash calculation regression

Commit 003b5c5719f159f4f4bf97511c4702a0638313dd ("block: Convert drivers
to immutable biovecs") incorrectly converted biovec iteration in
dm-verity to always calculate the hash from a full biovec, but the
function only needs to calculate the hash from part of the biovec (up to
the calculated "todo" value).

Fix this issue by limiting hash input to only the requested data size.

This problem was identified using the cryptsetup regression test for
veritysetup (verity-compat-test).

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Acked-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # 3.14+
drivers/md/dm-verity.c