Received: by 10.213.65.68 with SMTP id h4csp417294imn; Wed, 4 Apr 2018 00:19:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx48EK6Lo3WbDNmGiDvhvM6tXbIKwsg9iiBVtdFL3p6U6IZmqv7XVNqQCtbYAmKOwxQLYaPI/ X-Received: by 2002:a17:902:4545:: with SMTP id m63-v6mr17464248pld.149.1522826396905; Wed, 04 Apr 2018 00:19:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522826396; cv=none; d=google.com; s=arc-20160816; b=r2f8vVtEptdWrp0KtZG/J9oBuxRjMKKzv/j1TdMvyQ/eTDSPJloGDZFCJ/tHk2Aaoj QQzpdcbWKbAq8mBEmf8nkA7mHR2LoSPW1JwumZZFyXalPQ8L38mqZYO6ueiOtVaB9Uhw Ym/iUuVCgdN3Mole7t8mLHwhJY6xOj9bdcTS53NrfdHNTR5M9REaWN/3FGxYSg4tSmZi SoxqGTxsrLv3dDy9PjyyrGwhq5WCoHU7bFczxcWJoBzwBNITAMJ3M3+/sZNm2y8Bio0J zfKvaE0BD+B/J79H1hjq4pxzMMQXztnH4vfZdvADF6txc7lNYQnwM/viNws+tIG1iCId ZEIw== 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:message-id:date :subject:cc:to:from:arc-authentication-results; bh=nKVmBHrJw5+Xi7TDCHw8HzjQanmTFNcB+RePV8XbnDI=; b=aL62aghPzHDZWxfP4lZAp+sAd6nLLuvlRrCXeF3QJATUW7AJm/uqTS/bCQiUZSnhgG jCU9LhqihOl5pVUuXb/mZWXRuoqGwmGRMLCWZyuXAtUusl6fgUmN5GI52A1CbmiwhJ+J ygfwRcODV3Y6pmT1iWEXXAh1i7ERbRGenAKbSfbGHKVDmwYClcyAxT3jG3XHbfiDy7Dj Ai28Npan0qeXGoZrko9GvzJyEhS6TZTiRz3sgi+FqCjFFPiMvIPH5Opw4KJsqY4RE+bW 3ai5e6rrWozIHv8DMEkS1Yym/d67VLjUpb8/oTERtoq/L1ueVpPR2pz7SMm4acnBLO3t E1Ig== 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=monom.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d3-v6si2351535pll.486.2018.04.04.00.19.42; Wed, 04 Apr 2018 00:19:56 -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=monom.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751513AbeDDHSJ (ORCPT + 99 others); Wed, 4 Apr 2018 03:18:09 -0400 Received: from mail.monom.org ([188.138.9.77]:49580 "EHLO mail.monom.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751242AbeDDHRQ (ORCPT ); Wed, 4 Apr 2018 03:17:16 -0400 Received: from mail.monom.org (localhost [127.0.0.1]) by filter.mynetwork.local (Postfix) with ESMTP id E785F500A56; Wed, 4 Apr 2018 09:17:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.monom.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 Received: from localhost (ppp-93-104-185-33.dynamic.mnet-online.de [93.104.185.33]) by mail.monom.org (Postfix) with ESMTPSA id B0243500C40; Wed, 4 Apr 2018 09:17:13 +0200 (CEST) From: Daniel Wagner To: linux-kernel@vger.kernel.org Cc: linux-rt-users , Steven Rostedt , Thomas Gleixner , Carsten Emde , John Kacur , Paul Gortmaker , Julia Cartwright , Daniel Wagner , tom.zanussi@linux.intel.com, Sebastian Andrzej Siewior , stable-rt@vger.kernel.org Subject: [PATCH RT 4/7] arm*: disable NEON in kernel mode Date: Wed, 4 Apr 2018 09:16:49 +0200 Message-Id: <20180404071652.24196-5-wagi@monom.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180404071652.24196-1-wagi@monom.org> References: <20180404071652.24196-1-wagi@monom.org> 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 --- 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 79c4603e9453..5e054a0c4b25 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -2119,7 +2119,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 2cf32e9887e1..cd71b3432720 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.14.3