92 lines
3.2 KiB
Diff
92 lines
3.2 KiB
Diff
From d7d8af1b1fe1167e41c86d724c117cf18448d692 Mon Sep 17 00:00:00 2001
|
|
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
Date: Fri, 1 Dec 2017 10:42:03 +0100
|
|
Subject: [PATCH 352/365] arm*: disable NEON in kernel mode
|
|
|
|
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 <bigeasy@linutronix.de>
|
|
(cherry picked from commit b3a776555e0d465df138d254d6dc3ac1b718ac6d)
|
|
Signed-off-by: Julia Cartwright <julia@ni.com>
|
|
---
|
|
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 8c66dbdf819c..1d08ebc43953 100644
|
|
--- a/arch/arm/Kconfig
|
|
+++ b/arch/arm/Kconfig
|
|
@@ -2185,7 +2185,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 2b10984ee58c..b85a3b0fa4bf 100644
|
|
--- a/arch/arm64/crypto/Kconfig
|
|
+++ b/arch/arm64/crypto/Kconfig
|
|
@@ -10,41 +10,41 @@ 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
|
|
|
|
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_ARM64_CE
|
|
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_ARM64_CE
|
|
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.28.0
|
|
|