diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-02 17:53:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-02 17:53:12 -0400 |
commit | 797994f81a8b2bdca2eecffa415c1e7a89a4f961 (patch) | |
tree | 1383dc469c26ad37fdf960f682d9a48c782935c5 /drivers/crypto/ux500 | |
parent | c8d8566952fda026966784a62f324c8352f77430 (diff) | |
parent | 3862de1f6c442d53bd828d39f86d07d933a70605 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto update from Herbert Xu:
- XTS mode optimisation for twofish/cast6/camellia/aes on x86
- AVX2/x86_64 implementation for blowfish/twofish/serpent/camellia
- SSSE3/AVX/AVX2 optimisations for sha256/sha512
- Added driver for SAHARA2 crypto accelerator
- Fix for GMAC when used in non-IPsec secnarios
- Added generic CMAC implementation (including IPsec glue)
- IP update for crypto/atmel
- Support for more than one device in hwrng/timeriomem
- Added Broadcom BCM2835 RNG driver
- Misc fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (59 commits)
crypto: caam - fix job ring cleanup code
crypto: camellia - add AVX2/AES-NI/x86_64 assembler implementation of camellia cipher
crypto: serpent - add AVX2/x86_64 assembler implementation of serpent cipher
crypto: twofish - add AVX2/x86_64 assembler implementation of twofish cipher
crypto: blowfish - add AVX2/x86_64 implementation of blowfish cipher
crypto: tcrypt - add async cipher speed tests for blowfish
crypto: testmgr - extend camellia test-vectors for camellia-aesni/avx2
crypto: aesni_intel - fix Kconfig problem with CRYPTO_GLUE_HELPER_X86
crypto: aesni_intel - add more optimized XTS mode for x86-64
crypto: x86/camellia-aesni-avx - add more optimized XTS code
crypto: cast6-avx: use new optimized XTS code
crypto: x86/twofish-avx - use optimized XTS code
crypto: x86 - add more optimized XTS-mode for serpent-avx
xfrm: add rfc4494 AES-CMAC-96 support
crypto: add CMAC support to CryptoAPI
crypto: testmgr - add empty test vectors for null ciphers
crypto: testmgr - add AES GMAC test vectors
crypto: gcm - fix rfc4543 to handle async crypto correctly
crypto: gcm - make GMAC work when dst and src are different
hwrng: timeriomem - added devicetree hooks
...
Diffstat (limited to 'drivers/crypto/ux500')
-rw-r--r-- | drivers/crypto/ux500/hash/hash_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c index 1827e9f1f873..cf5508967539 100644 --- a/drivers/crypto/ux500/hash/hash_core.c +++ b/drivers/crypto/ux500/hash/hash_core.c | |||
@@ -938,6 +938,7 @@ static int hash_dma_final(struct ahash_request *req) | |||
938 | if (!ctx->device->dma.nents) { | 938 | if (!ctx->device->dma.nents) { |
939 | dev_err(device_data->dev, "[%s] " | 939 | dev_err(device_data->dev, "[%s] " |
940 | "ctx->device->dma.nents = 0", __func__); | 940 | "ctx->device->dma.nents = 0", __func__); |
941 | ret = ctx->device->dma.nents; | ||
941 | goto out; | 942 | goto out; |
942 | } | 943 | } |
943 | 944 | ||
@@ -945,6 +946,7 @@ static int hash_dma_final(struct ahash_request *req) | |||
945 | if (bytes_written != req->nbytes) { | 946 | if (bytes_written != req->nbytes) { |
946 | dev_err(device_data->dev, "[%s] " | 947 | dev_err(device_data->dev, "[%s] " |
947 | "hash_dma_write() failed!", __func__); | 948 | "hash_dma_write() failed!", __func__); |
949 | ret = bytes_written; | ||
948 | goto out; | 950 | goto out; |
949 | } | 951 | } |
950 | 952 | ||
@@ -1367,14 +1369,12 @@ static int hash_setkey(struct crypto_ahash *tfm, | |||
1367 | /** | 1369 | /** |
1368 | * Freed in final. | 1370 | * Freed in final. |
1369 | */ | 1371 | */ |
1370 | ctx->key = kmalloc(keylen, GFP_KERNEL); | 1372 | ctx->key = kmemdup(key, keylen, GFP_KERNEL); |
1371 | if (!ctx->key) { | 1373 | if (!ctx->key) { |
1372 | pr_err(DEV_DBG_NAME " [%s] Failed to allocate ctx->key " | 1374 | pr_err(DEV_DBG_NAME " [%s] Failed to allocate ctx->key " |
1373 | "for %d\n", __func__, alg); | 1375 | "for %d\n", __func__, alg); |
1374 | return -ENOMEM; | 1376 | return -ENOMEM; |
1375 | } | 1377 | } |
1376 | |||
1377 | memcpy(ctx->key, key, keylen); | ||
1378 | ctx->keylen = keylen; | 1378 | ctx->keylen = keylen; |
1379 | 1379 | ||
1380 | return ret; | 1380 | return ret; |