Return-Path: Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:42058 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754425AbdJIMp2 (ORCPT ); Mon, 9 Oct 2017 08:45:28 -0400 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Jan Stancek" , "Herbert Xu" Date: Mon, 09 Oct 2017 13:44:24 +0100 Message-ID: Subject: [PATCH 3.16 092/192] crypto: sha1-ssse3 - Disable avx2 In-Reply-To: Sender: stable-owner@vger.kernel.org List-ID: 3.16.49-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Herbert Xu commit b82ce24426a4071da9529d726057e4e642948667 upstream. It has been reported that sha1-avx2 can cause page faults by reading beyond the end of the input. This patch disables it until it can be fixed. Fixes: 7c1da8d0d046 ("crypto: sha - SHA1 transform x86_64 AVX2") Reported-by: Jan Stancek Signed-off-by: Herbert Xu [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings --- --- a/arch/x86/crypto/sha1_ssse3_glue.c +++ b/arch/x86/crypto/sha1_ssse3_glue.c @@ -224,7 +224,8 @@ static bool __init avx_usable(void) #ifdef CONFIG_AS_AVX2 static bool __init avx2_usable(void) { - if (avx_usable() && cpu_has_avx2 && boot_cpu_has(X86_FEATURE_BMI1) && + if (false && avx_usable() && cpu_has_avx2 && + boot_cpu_has(X86_FEATURE_BMI1) && boot_cpu_has(X86_FEATURE_BMI2)) return true;