]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
dm crypt: add post iv call to iv generator
authorMilan Broz <mbroz@redhat.com>
Thu, 13 Jan 2011 19:59:54 +0000 (19:59 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 13 Jan 2011 19:59:54 +0000 (19:59 +0000)
commit2dc5327d3acb3340ab6fa3981401b076b78a51f4
tree32297319cd947ea8ab867ec97042983382959db8
parent20c82538e4f5ede51bc2b4795bc6e5cae772796d
dm crypt: add post iv call to iv generator

IV (initialisation vector) can in principle depend not only
on sector but also on plaintext data (or other attributes).

Change IV generator interface to work directly with dmreq
structure to allow such dependence in generator.

Also add post() function which is called after the crypto
operation.

This allows tricky modification of decrypted data or IV
internals.

In asynchronous mode the post() can be called after
ctx->sector count was increased so it is needed
to add iv_sector copy directly to dmreq structure.
(N.B. dmreq always include only one sector in scatterlists)

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