dm crypt: make wipe message also wipe essiv key
authorMilan Broz <mbroz@redhat.com>
Thu, 10 Dec 2009 23:51:57 +0000 (23:51 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 10 Dec 2009 23:51:57 +0000 (23:51 +0000)
commit542da317668c35036e8471822a564b609d05af66
tree3c553eda1e52cde6b7270fb0b7aa3b5db80d58d9
parentb95bf2d3d5a48b095bffe2a0cd8c40453cf59557
dm crypt: make wipe message also wipe essiv key

The "wipe key" message is used to wipe the volume key from memory
temporarily, for example when suspending to RAM.

But the initialisation vector in ESSIV mode is calculated from the
hashed volume key, so the wipe message should wipe this IV key too and
reinitialise it when the volume key is reinstated.

This patch adds an IV wipe method called from a wipe message callback.
ESSIV is then reinitialised using the init function added by the
last patch.

Cc: stable@kernel.org
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-crypt.c