Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp546931pxb; Wed, 3 Mar 2021 09:17:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVnudhQ5c9GKWA2nRKUQt3BexNTNToRN9KJcWuHpn5AZ3ItBS2fRjX/ulg6HA2cUIauLMQ X-Received: by 2002:a05:6402:220a:: with SMTP id cq10mr261654edb.345.1614791821298; Wed, 03 Mar 2021 09:17:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614791821; cv=none; d=google.com; s=arc-20160816; b=gcjUcNAhG/3xqLmhKX0nUXM/GegSdLQMAAfrMGQoyZtCxOMa5MZqPQh05oBANJmdro ZmXQpoX7lCCQQqqJZcfGAwlxuS2kwdnuOCYlQCQC1xvmA6jRKaATbSDhp++HdgCmUXTX cE7kIqPbrCI2BXjwYqrcme3h6hhoYxG7NW8rnXALh0HSiY/BUyS+n1gplLEMU4RO5kDQ KHzduTCRgtC+dAMmfxQV/SKJaPewgXQra6ApPDB4WeWIQmT1Hey2nzXzohbjb6s3R9vf xUnIFgUUrBcfW4qi6BGA0n401cPcl3IRVwEiAN0kRql83DxlaA4HJZ9GyGqe7V3IEeZa IoGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hrpfPxEfosqbqkC0sXyHCjcebPhIbBPdPPiAakZM0Uk=; b=zGpq8IP76mHdomDPVaVsKVRqawX9T2K7AGcCBm1fn0er2zdO602+pDKZCB6ATCkdJc xWX/bmGz0YwoI46l8rs6xjEplkWZvPyqdNau1910qk7YGPrQ4vdcrO2ZqxmARcfxcgSh xdKGXvFk4OkR9N4/XjNMlXPcv0Yh82oE6IjiUUKjrj4k3H7zaNGVCNYHqbfIaPkLGT++ ReS3AUuvXyqk7Z0Ptl4pPjtl9BWCHFDIy7M77QOTkVTeexx5gTF4ZfxXKDF8kyhDg//7 JrXbonm7hthehhnox8hHNOGczQomfRmsdEetmfAaGSyW1WZEjUyeixO/ikdbY5BiehHv QB2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cw7J67rK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e17si17983779edj.155.2021.03.03.09.16.32; Wed, 03 Mar 2021 09:17:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cw7J67rK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377258AbhCBAqY (ORCPT + 99 others); Mon, 1 Mar 2021 19:46:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:49798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239890AbhCASlY (ORCPT ); Mon, 1 Mar 2021 13:41:24 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9051865181; Mon, 1 Mar 2021 17:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614618599; bh=YhydecnlhYoUW59rtXFRXKhzE4m+Nz8rJ9pYrHDnRLc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cw7J67rK46Cv4ANkIl1ZyVqUaUnK8bfD82lObmAG1PjETPZhTaMS+X5S1z2EmdcPN AdJk32q8VM00hyJyqR4E30nLGgY4i0VGx+pf93CkVlhOphyvKJhn+unB5l6oNWFalA +SQwMBK2wQwwTEgIL7N//5gjZc2+bkWrlmQvpZfs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel , Herbert Xu , Sasha Levin Subject: [PATCH 5.10 146/663] crypto: arm64/aes-ce - really hide slower algos when faster ones are enabled Date: Mon, 1 Mar 2021 17:06:34 +0100 Message-Id: <20210301161148.993153633@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ard Biesheuvel [ Upstream commit 15deb4333cd6d4e1e3216582e4c531ec40a6b060 ] Commit 69b6f2e817e5b ("crypto: arm64/aes-neon - limit exposed routines if faster driver is enabled") intended to hide modes from the plain NEON driver that are also implemented by the faster bit sliced NEON one if both are enabled. However, the defined() CPP function does not detect if the bit sliced NEON driver is enabled as a module. So instead, let's use IS_ENABLED() here. Fixes: 69b6f2e817e5b ("crypto: arm64/aes-neon - limit exposed routines if ...") Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- arch/arm64/crypto/aes-glue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/crypto/aes-glue.c b/arch/arm64/crypto/aes-glue.c index 395bbf64b2abb..53c92e060c3dd 100644 --- a/arch/arm64/crypto/aes-glue.c +++ b/arch/arm64/crypto/aes-glue.c @@ -55,7 +55,7 @@ MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 Crypto Extensions"); #define aes_mac_update neon_aes_mac_update MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 NEON"); #endif -#if defined(USE_V8_CRYPTO_EXTENSIONS) || !defined(CONFIG_CRYPTO_AES_ARM64_BS) +#if defined(USE_V8_CRYPTO_EXTENSIONS) || !IS_ENABLED(CONFIG_CRYPTO_AES_ARM64_BS) MODULE_ALIAS_CRYPTO("ecb(aes)"); MODULE_ALIAS_CRYPTO("cbc(aes)"); MODULE_ALIAS_CRYPTO("ctr(aes)"); @@ -650,7 +650,7 @@ static int __maybe_unused xts_decrypt(struct skcipher_request *req) } static struct skcipher_alg aes_algs[] = { { -#if defined(USE_V8_CRYPTO_EXTENSIONS) || !defined(CONFIG_CRYPTO_AES_ARM64_BS) +#if defined(USE_V8_CRYPTO_EXTENSIONS) || !IS_ENABLED(CONFIG_CRYPTO_AES_ARM64_BS) .base = { .cra_name = "__ecb(aes)", .cra_driver_name = "__ecb-aes-" MODE, -- 2.27.0