]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dm crypt: separate essiv allocation from initialisation
authorMilan Broz <mbroz@redhat.com>
Thu, 10 Dec 2009 23:51:56 +0000 (23:51 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 22:05:03 +0000 (14:05 -0800)
commit7d41627824496f9c69ab2da972a72521ebeebf7a
treee1dcba1189ec4524e4e7314b7a94262cecd66fda
parent8419ee8215942d6bf3814391730421a4897fc410
dm crypt: separate essiv allocation from initialisation

commit b95bf2d3d5a48b095bffe2a0cd8c40453cf59557 upstream.

This patch separates the construction of IV from its initialisation.
(For ESSIV it is a hash calculation based on volume key.)

Constructor code now preallocates hash tfm and salt array
and saves it in a private IV structure.

The next patch requires this to reinitialise the wiped IV
without reallocating memory when resuming a suspended device.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/dm-crypt.c