From: Michael Ellerman <mpe@ellerman.id.au>
To: Michal Suchanek <msuchanek@suse.de>,
linuxppc-dev@lists.ozlabs.org,
Herbert Xu <herbert@gondor.apana.org.au>
Cc: Michal Suchanek <msuchanek@suse.de>,
"David S. Miller" <davem@davemloft.net>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Naveen N Rao <naveen@kernel.org>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Danny Tsen <dtsen@linux.ibm.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
Nicolai Stange <nstange@suse.com>
Subject: Re: [PATCH] aes-gcm-p10: Use the correct bit to test for P10
Date: Thu, 07 Nov 2024 22:43:17 +1100 [thread overview]
Message-ID: <87h68jclre.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20241106121019.25629-1-msuchanek@suse.de>
Michal Suchanek <msuchanek@suse.de> writes:
> A hwcap feature bit is passed to cpu_has_feature, resulting in testing
> for CPU_FTR_MMCRA instead of the 3.1 platform revision.
Ouch. Good find.
Notably all IBM Power CPUs have MMCRA set, so the feature test is
essentially a nop.
> Fixes: c954b252dee9 ("crypto: powerpc/p10-aes-gcm - Register modules as SIMD")
^ which is only in linux-next so no stable tag needed.
> Reported-by: Nicolai Stange <nstange@suse.com>
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
> arch/powerpc/crypto/aes-gcm-p10-glue.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
cheers
> diff --git a/arch/powerpc/crypto/aes-gcm-p10-glue.c b/arch/powerpc/crypto/aes-gcm-p10-glue.c
> index e52629334cf8..1f8b67775658 100644
> --- a/arch/powerpc/crypto/aes-gcm-p10-glue.c
> +++ b/arch/powerpc/crypto/aes-gcm-p10-glue.c
> @@ -414,7 +414,7 @@ static int __init p10_init(void)
> {
> int ret;
>
> - if (!cpu_has_feature(PPC_FEATURE2_ARCH_3_1))
> + if (!cpu_has_feature(CPU_FTR_ARCH_31))
> return 0;
>
> ret = simd_register_aeads_compat(gcm_aes_algs,
> --
> 2.46.1
next prev parent reply other threads:[~2024-11-07 11:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 13:30 [PATCH 0/3] crypto: Fix data mismatch over ipsec tunnel encrypted/decrypted with ppc64le AES/GCM module Danny Tsen
2024-09-23 13:30 ` [PATCH 1/3] crypto: Re-write AES/GCM stitched implementation for ppcle64 Danny Tsen
2024-09-23 13:32 ` kernel test robot
2024-09-23 13:30 ` [PATCH 2/3] crypto: Register modules as SIMD modules for ppcle64 AES/GCM algs Danny Tsen
2024-11-06 12:09 ` [PATCH] aes-gcm-p10: Use the correct bit to test for P10 Michal Suchanek
2024-11-07 11:43 ` Michael Ellerman [this message]
2024-11-15 11:58 ` Herbert Xu
2024-09-23 13:30 ` [PATCH 3/3] crypto: added CRYPTO_SIMD in Kconfig for CRYPTO_AES_GCM_P10 Danny Tsen
2024-10-05 5:35 ` [PATCH 0/3] crypto: Fix data mismatch over ipsec tunnel encrypted/decrypted with ppc64le AES/GCM module Herbert Xu
2024-10-07 11:02 ` Danny Tsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h68jclre.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=christophe.leroy@csgroup.eu \
--cc=davem@davemloft.net \
--cc=dtsen@linux.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=msuchanek@suse.de \
--cc=naveen@kernel.org \
--cc=npiggin@gmail.com \
--cc=nstange@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.