[CRYPTO] scatterwalk: Prepare for block ciphers
authorHerbert Xu <herbert@gondor.apana.org.au>
Sat, 12 Aug 2006 11:56:17 +0000 (21:56 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 21 Sep 2006 01:41:52 +0000 (11:41 +1000)
commit5c64097aa0f6dc4f27718ef47ca9a12538d62860
treed8c0cd3358464f589c9f2778b7be348f73db6950
parentf28776a369b12f9a03a822a8e1090ed670a41f4f
[CRYPTO] scatterwalk: Prepare for block ciphers

This patch prepares the scatterwalk code for use by the new block cipher
type.

Firstly it halves the size of scatter_walk on 32-bit platforms.  This
is important as we allocate at least two of these objects on the stack
for each block cipher operation.

It also exports the symbols since the block cipher code can be built as
a module.

Finally there is a hack in scatterwalk_unmap that relies on progress
being made.  Unfortunately, for hardware crypto we can't guarantee
progress to be made since the hardware can fail.

So this also gets rid of the hack by not advancing the address returned
by scatterwalk_map.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/cipher.c
crypto/scatterwalk.c
crypto/scatterwalk.h
include/crypto/algapi.h