summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorLinus Torvalds2015-10-13 19:18:54 +0200
committerLinus Torvalds2015-10-13 19:18:54 +0200
commit6006d4521b158e5ef48620e8c9028bba91bf985d (patch)
tree0513b2a3acb5c536fc815a2c6055f1ee2af7a341 /arch/x86
parentMerge tag 'iommu-fixes-v4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel... (diff)
parentcrypto: ahash - ensure statesize is non-zero (diff)
downloadkernel-qcow2-linux-6006d4521b158e5ef48620e8c9028bba91bf985d.tar.gz
kernel-qcow2-linux-6006d4521b158e5ef48620e8c9028bba91bf985d.tar.xz
kernel-qcow2-linux-6006d4521b158e5ef48620e8c9028bba91bf985d.zip
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: - Fix AVX detection to prevent use of non-existent AESNI. - Some SPARC ciphers did not set their IV size which may lead to memory corruption" * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: ahash - ensure statesize is non-zero crypto: camellia_aesni_avx - Fix CPU feature checks crypto: sparc - initialize blkcipher.ivsize
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/crypto/camellia_aesni_avx_glue.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/crypto/camellia_aesni_avx_glue.c b/arch/x86/crypto/camellia_aesni_avx_glue.c
index 80a0e4389c9a..bacaa13acac5 100644
--- a/arch/x86/crypto/camellia_aesni_avx_glue.c
+++ b/arch/x86/crypto/camellia_aesni_avx_glue.c
@@ -554,6 +554,11 @@ static int __init camellia_aesni_init(void)
{
const char *feature_name;
+ if (!cpu_has_avx || !cpu_has_aes || !cpu_has_osxsave) {
+ pr_info("AVX or AES-NI instructions are not detected.\n");
+ return -ENODEV;
+ }
+
if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, &feature_name)) {
pr_info("CPU feature '%s' is not supported.\n", feature_name);
return -ENODEV;