Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp131349imm; Thu, 2 Aug 2018 15:27:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcqbSM4ShoSoumaq3wQqJ01HBRwMXou0qZUaHSsP9SAMdWGRiZdjoTIuJHsrTATHeeotk1m X-Received: by 2002:a62:a018:: with SMTP id r24-v6mr1428501pfe.144.1533248862717; Thu, 02 Aug 2018 15:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533248862; cv=none; d=google.com; s=arc-20160816; b=oWd5Fz/6RcQDI+0CeSSDkUv/Sb7m6kjPLeXBBg6ig85u7l7gGxEPRXby3pRM9PRP3O cxaGT60Ocxm3mc7GD2rJ9BZfucDNGRC0zwhsjz9MqKk9pErNFyJ2yTqm25O6zYVWC1Ee +RLnKYs/0z2GHzNmDSOvgU+XFXEdTPu/pbkG3+ChLa3ZS6x/SAu4k8hFP7fyIAsplFzj gEurF2SmkjgORx3fdJxNy3Yi9ClpWey06qUrSK5F6a0efEJ9YbNhDKrwLNy3kKEvvutU C8NAHvbgGwkyD1ohrA6NMTlwls0IGU7TyuRMXYEw9+DvKpKDUtHLl6uX1qXMzz4w2+5x XvUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=xSmhf7hpv3Y5ZcrR2F0rVEvl4rn9UvTBUexkUDhXjFI=; b=atrBW7vRdpk/HVD+XXWzcGCYEsUmLpsQw442z2M2TMgvSEvIepMq6Cb97BrKdi8D0v RH0tmq4zTHF00LNdc3069Q8Yn31NqSvu6FR40W8xsdWWk3G7o3nm7eCIwEg+RYiHkHbb T3q3YiK1pONl9Bv6RenKyoT113gJD+xlrLkl54u2khq4hcYIHvvSPUOrZ/8Aa3DXciZc UFtHg5d0PtvxHe0A/kbUmhonFVuRriArzF9ukn9F3/ye65bV7zm5qEzhcG3aeK2lIIMP iPJ3PGHUaKepRWeMekfZA6pXKbU/U95nsiyOwhs0ZR4N+kG1gT/k3/CM58TETeNi5OpO S+8A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c9-v6si3218317pgj.654.2018.08.02.15.27.28; Thu, 02 Aug 2018 15:27:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731926AbeHCATf (ORCPT + 99 others); Thu, 2 Aug 2018 20:19:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:34756 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726702AbeHCATe (ORCPT ); Thu, 2 Aug 2018 20:19:34 -0400 Received: from localhost.localdomain (c-98-220-238-81.hsd1.il.comcast.net [98.220.238.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D68BA21582; Thu, 2 Aug 2018 22:26:21 +0000 (UTC) From: Tom Zanussi To: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org Cc: rostedt@goodmis.org, tglx@linutronix.de, C.Emde@osadl.org, jkacur@redhat.com, bigeasy@linutronix.de, daniel.wagner@siemens.com, julia@ni.com, stable-rt@vger.kernel.org, Daniel Wagner , Tom Zanussi Subject: [PATCH 02/15] arm*: disable NEON in kernel mode Date: Thu, 2 Aug 2018 17:25:17 -0500 Message-Id: <90e82fad6865051bc8896ab94e40843a94adf6e8.1533242791.git.tom.zanussi@linux.intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sebastian Andrzej Siewior NEON in kernel mode is used by the crypto algorithms and raid6 code. While the raid6 code looks okay, the crypto algorithms do not: NEON is enabled on first invocation and may allocate/free/map memory before the NEON mode is disabled again. This needs to be changed until it can be enabled. On ARM NEON in kernel mode can be simply disabled. on ARM64 it needs to stay on due to possible EFI callbacks so here I disable each algorithm. Cc: stable-rt@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Daniel Wagner (cherry picked from commit 728b41d8e7b5307b52bdbffcb492bc8345a4e38a) Signed-off-by: Tom Zanussi --- arch/arm/Kconfig | 2 +- arch/arm64/crypto/Kconfig | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index d635abf51063..12b1e7a5f103 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -2122,7 +2122,7 @@ config NEON config KERNEL_MODE_NEON bool "Support for NEON in kernel mode" - depends on NEON && AEABI + depends on NEON && AEABI && !PREEMPT_RT_BASE help Say Y to include support for NEON in kernel mode. diff --git a/arch/arm64/crypto/Kconfig b/arch/arm64/crypto/Kconfig index 5562652c5316..003fe0718117 100644 --- a/arch/arm64/crypto/Kconfig +++ b/arch/arm64/crypto/Kconfig @@ -10,42 +10,42 @@ if ARM64_CRYPTO config CRYPTO_SHA1_ARM64_CE tristate "SHA-1 digest algorithm (ARMv8 Crypto Extensions)" - depends on ARM64 && KERNEL_MODE_NEON + depends on ARM64 && KERNEL_MODE_NEON && !PREEMPT_RT_BASE select CRYPTO_HASH config CRYPTO_SHA2_ARM64_CE tristate "SHA-224/SHA-256 digest algorithm (ARMv8 Crypto Extensions)" - depends on ARM64 && KERNEL_MODE_NEON + depends on ARM64 && KERNEL_MODE_NEON && !PREEMPT_RT_BASE select CRYPTO_HASH config CRYPTO_GHASH_ARM64_CE tristate "GHASH (for GCM chaining mode) using ARMv8 Crypto Extensions" - depends on ARM64 && KERNEL_MODE_NEON + depends on ARM64 && KERNEL_MODE_NEON && !PREEMPT_RT_BASE select CRYPTO_HASH config CRYPTO_AES_ARM64_CE tristate "AES core cipher using ARMv8 Crypto Extensions" - depends on ARM64 && KERNEL_MODE_NEON + depends on ARM64 && KERNEL_MODE_NEON && !PREEMPT_RT_BASE select CRYPTO_ALGAPI select CRYPTO_AES config CRYPTO_AES_ARM64_CE_CCM tristate "AES in CCM mode using ARMv8 Crypto Extensions" - depends on ARM64 && KERNEL_MODE_NEON + depends on ARM64 && KERNEL_MODE_NEON && !PREEMPT_RT_BASE select CRYPTO_ALGAPI select CRYPTO_AES select CRYPTO_AEAD config CRYPTO_AES_ARM64_CE_BLK tristate "AES in ECB/CBC/CTR/XTS modes using ARMv8 Crypto Extensions" - depends on ARM64 && KERNEL_MODE_NEON + depends on ARM64 && KERNEL_MODE_NEON && !PREEMPT_RT_BASE select CRYPTO_BLKCIPHER select CRYPTO_AES select CRYPTO_ABLK_HELPER config CRYPTO_AES_ARM64_NEON_BLK tristate "AES in ECB/CBC/CTR/XTS modes using NEON instructions" - depends on ARM64 && KERNEL_MODE_NEON + depends on ARM64 && KERNEL_MODE_NEON && !PREEMPT_RT_BASE select CRYPTO_BLKCIPHER select CRYPTO_AES select CRYPTO_ABLK_HELPER -- 2.14.1