]> git.baikalelectronics.ru Git - kernel.git/commit
dm verity: fix no salt use case
authorGilad Ben-Yossef <gilad@benyossef.com>
Thu, 18 May 2017 10:47:25 +0000 (13:47 +0300)
committerMike Snitzer <snitzer@redhat.com>
Mon, 22 May 2017 17:49:03 +0000 (13:49 -0400)
commit17cd0b326cfba74bddd5778274378ea89fef51f9
treeca0094e3a1a789be5f5346c79884927e5e43e264
parent4ca6e51b940d7e938a17cd36206a7ae158216d70
dm verity: fix no salt use case

DM-Verity has an (undocumented) mode where no salt is used.  This was
never handled directly by the DM-Verity code, instead working due to the
fact that calling crypto_shash_update() with a zero length data is an
implicit noop.

This is no longer the case now that we have switched to
crypto_ahash_update().  Fix the issue by introducing explicit handling
of the no salt use case to DM-Verity.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Reported-by: Marian Csontos <mcsontos@redhat.com>
Fixes: 32b85f0 ("dm verity: switch to using asynchronous hash crypto API")
Tested-by: Milan Broz <gmazyland@gmail.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-verity-target.c