diff options
author | Kent Yoder <key@linux.vnet.ibm.com> | 2013-04-12 13:13:59 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-05-24 04:11:10 -0400 |
commit | 1ad936e850a896bc16e0d72a56be432f9954ad7e (patch) | |
tree | d0108b0f99c61e6779eadbaebf29ed5b6be2e485 /drivers/crypto/nx/nx-aes-ecb.c | |
parent | 519fe2ecb755b875d9814cdda19778c2e88c6901 (diff) |
drivers/crypto/nx: Fixes for multiple races and issues
Fixes a race on driver init with registering algorithms where the
driver status flag wasn't being set before self testing started.
Added the cra_alignmask field for CBC and ECB modes.
Fixed a bug in GCM where AES block size was being used instead of
authsize.
Removed use of blkcipher_walk routines for scatterlist processing.
Corner cases in the code prevent us from processing an entire
scatterlist at a time and walking the buffers in block sized chunks
turns out to be unecessary anyway.
Fixed off-by-one error in saving off extra data in the sha code.
Fixed accounting error for number of bytes processed in the sha code.
Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/crypto/nx/nx-aes-ecb.c')
-rw-r--r-- | drivers/crypto/nx/nx-aes-ecb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/crypto/nx/nx-aes-ecb.c b/drivers/crypto/nx/nx-aes-ecb.c index ba5f1611336f..7bbc9a81da21 100644 --- a/drivers/crypto/nx/nx-aes-ecb.c +++ b/drivers/crypto/nx/nx-aes-ecb.c | |||
@@ -123,6 +123,7 @@ struct crypto_alg nx_ecb_aes_alg = { | |||
123 | .cra_priority = 300, | 123 | .cra_priority = 300, |
124 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, | 124 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, |
125 | .cra_blocksize = AES_BLOCK_SIZE, | 125 | .cra_blocksize = AES_BLOCK_SIZE, |
126 | .cra_alignmask = 0xf, | ||
126 | .cra_ctxsize = sizeof(struct nx_crypto_ctx), | 127 | .cra_ctxsize = sizeof(struct nx_crypto_ctx), |
127 | .cra_type = &crypto_blkcipher_type, | 128 | .cra_type = &crypto_blkcipher_type, |
128 | .cra_module = THIS_MODULE, | 129 | .cra_module = THIS_MODULE, |