[linux] 01/01: [x86] crypto camellia_aesni_avx: Fix CPU feature checks (Closes: #800934)

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Tue Oct 6 12:35:00 UTC 2015


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch sid
in repository linux.

commit 14667fb8dbde8b645b98fc18729b6593c48d8b69
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Tue Oct 6 12:34:12 2015 +0100

    [x86] crypto camellia_aesni_avx: Fix CPU feature checks (Closes: #800934)
---
 debian/changelog                                   |  1 +
 ...camellia_aesni_avx-fix-cpu-feature-checks.patch | 36 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 38 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 2a49b49..cff0dcd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -132,6 +132,7 @@ linux (4.2.3-1) UNRELEASED; urgency=medium
   * netfilter: conntrack: use nf_ct_tmpl_free in CT/synproxy error paths
     (Closes: #800445)
   * [arm64] Defer workaround for erratum #843419
+  * [x86] crypto camellia_aesni_avx: Fix CPU feature checks (Closes: #800934)
 
   [ Salvatore Bonaccorso ]
   * ipc: Initialize msg/shm IPC objects before doing ipc_addid()
diff --git a/debian/patches/bugfix/x86/crypto-x86-camellia_aesni_avx-fix-cpu-feature-checks.patch b/debian/patches/bugfix/x86/crypto-x86-camellia_aesni_avx-fix-cpu-feature-checks.patch
new file mode 100644
index 0000000..928504b
--- /dev/null
+++ b/debian/patches/bugfix/x86/crypto-x86-camellia_aesni_avx-fix-cpu-feature-checks.patch
@@ -0,0 +1,36 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Mon, 5 Oct 2015 16:40:01 +0100
+Subject: crypto x86/camellia_aesni_avx: Fix CPU feature checks
+Bug-Debian: https://bugs.debian.org/800934
+Forwarded: http://mid.gmane.org/1444131093.2956.122.camel@decadent.org.uk
+
+We need to explicitly check the AVX and AES CPU features, as we can't
+infer them from the related XSAVE feature flags.  For example, the
+Core i3 2310M passes the XSAVE feature test but does not implement
+AES-NI.
+
+Reported-and-tested-by: Stéphane Glondu <glondu at debian.org>
+References: https://bugs.debian.org/800934
+Fixes: ce4f5f9b65ae ("x86/fpu, crypto x86/camellia_aesni_avx: Simplify...")
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+Cc: stable <stable at vger.kernel.org> # 4.2
+---
+ arch/x86/crypto/camellia_aesni_avx_glue.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/arch/x86/crypto/camellia_aesni_avx_glue.c b/arch/x86/crypto/camellia_aesni_avx_glue.c
+index 80a0e43..bacaa13 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;
diff --git a/debian/patches/series b/debian/patches/series
index 57b1ae5..adb15cc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -103,3 +103,4 @@ bugfix/all/netfilter-conntrack-use-nf_ct_tmpl_free-in-ct-synpro.patch
 bugfix/all/Initialize-msg-shm-IPC-objects-before-doing-ipc_addi.patch
 features/all/ath10k-add-qca6164-support.patch
 debian/block-fix-abi-change-in-4.2.2.patch
+bugfix/x86/crypto-x86-camellia_aesni_avx-fix-cpu-feature-checks.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list