summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-09-16 07:53:33 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-16 07:53:33 -0700
commitaa57e0b281453334267e836d15cfdb933f6d6f97 (patch)
tree2c3e1dc9a396550317e15f4be9f7e0d101bf501e /crypto
parent865ca084fdc68cd9b658da4b098008278da8fed3 (diff)
parent84cba178a3b88efe2668a9039f70abda072faa21 (diff)
downloadlinux-aa57e0b281453334267e836d15cfdb933f6d6f97.tar.bz2
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: "This fixes the following issues: - The selftest overreads the IV test vector. - Fix potential infinite loop in sunxi-ss driver. - Fix powerpc build failure when VMX is set without VSX" * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: testmgr - don't copy from source IV too much crypto: sunxi-ss - Fix a possible driver hang with ciphers crypto: vmx - VMX crypto should depend on CONFIG_VSX
Diffstat (limited to 'crypto')
-rw-r--r--crypto/testmgr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 35c2de136971..fa18753f5c34 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -940,6 +940,7 @@ static int __test_skcipher(struct crypto_skcipher *tfm, int enc,
char *xbuf[XBUFSIZE];
char *xoutbuf[XBUFSIZE];
int ret = -ENOMEM;
+ unsigned int ivsize = crypto_skcipher_ivsize(tfm);
if (testmgr_alloc_buf(xbuf))
goto out_nobuf;
@@ -975,7 +976,7 @@ static int __test_skcipher(struct crypto_skcipher *tfm, int enc,
continue;
if (template[i].iv)
- memcpy(iv, template[i].iv, MAX_IVLEN);
+ memcpy(iv, template[i].iv, ivsize);
else
memset(iv, 0, MAX_IVLEN);
@@ -1051,7 +1052,7 @@ static int __test_skcipher(struct crypto_skcipher *tfm, int enc,
continue;
if (template[i].iv)
- memcpy(iv, template[i].iv, MAX_IVLEN);
+ memcpy(iv, template[i].iv, ivsize);
else
memset(iv, 0, MAX_IVLEN);