* [PATCH] crypto: powerpc/poly1305 - add depends on BROKEN for now
@ 2025-05-14 5:18 Eric Biggers
2025-05-14 9:41 ` Herbert Xu
2025-05-20 2:41 ` Herbert Xu
0 siblings, 2 replies; 8+ messages in thread
From: Eric Biggers @ 2025-05-14 5:18 UTC (permalink / raw)
To: linux-crypto
Cc: linuxppc-dev, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Naveen N Rao, Danny Tsen,
Segher Boessenkool, stable
From: Eric Biggers <ebiggers@google.com>
As discussed in the thread containing
https://lore.kernel.org/linux-crypto/20250510053308.GB505731@sol/, the
Power10-optimized Poly1305 code is currently not safe to call in softirq
context. Disable it for now. It can be re-enabled once it is fixed.
Fixes: ba8f8624fde2 ("crypto: poly1305-p10 - Glue code for optmized Poly1305 implementation for ppc64le")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
arch/powerpc/lib/crypto/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/lib/crypto/Kconfig b/arch/powerpc/lib/crypto/Kconfig
index ffa541ad6d5da..3f9e1bbd9905b 100644
--- a/arch/powerpc/lib/crypto/Kconfig
+++ b/arch/powerpc/lib/crypto/Kconfig
@@ -8,10 +8,11 @@ config CRYPTO_CHACHA20_P10
select CRYPTO_ARCH_HAVE_LIB_CHACHA
config CRYPTO_POLY1305_P10
tristate
depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
+ depends on BROKEN # Needs to be fixed to work in softirq context
default CRYPTO_LIB_POLY1305
select CRYPTO_ARCH_HAVE_LIB_POLY1305
select CRYPTO_LIB_POLY1305_GENERIC
config CRYPTO_SHA256_PPC_SPE
base-commit: 57999ed153ed7e651afecbabe0e998e75cf2d798
--
2.49.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] crypto: powerpc/poly1305 - add depends on BROKEN for now
2025-05-14 5:18 [PATCH] crypto: powerpc/poly1305 - add depends on BROKEN for now Eric Biggers
@ 2025-05-14 9:41 ` Herbert Xu
2025-05-14 16:29 ` Eric Biggers
2025-05-20 2:41 ` Herbert Xu
1 sibling, 1 reply; 8+ messages in thread
From: Herbert Xu @ 2025-05-14 9:41 UTC (permalink / raw)
To: Eric Biggers
Cc: linux-crypto, linuxppc-dev, maddy, mpe, npiggin, christophe.leroy,
naveen, dtsen, segher, stable
Eric Biggers <ebiggers@kernel.org> wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> As discussed in the thread containing
> https://lore.kernel.org/linux-crypto/20250510053308.GB505731@sol/, the
> Power10-optimized Poly1305 code is currently not safe to call in softirq
> context. Disable it for now. It can be re-enabled once it is fixed.
>
> Fixes: ba8f8624fde2 ("crypto: poly1305-p10 - Glue code for optmized Poly1305 implementation for ppc64le")
> Cc: stable@vger.kernel.org
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
> arch/powerpc/lib/crypto/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
I thought this fix should be enough, no?
https://patchwork.kernel.org/project/linux-crypto/patch/aB8Yy0JGvoErc0ns@gondor.apana.org.au/
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] crypto: powerpc/poly1305 - add depends on BROKEN for now
2025-05-14 9:41 ` Herbert Xu
@ 2025-05-14 16:29 ` Eric Biggers
2025-05-15 2:10 ` Herbert Xu
0 siblings, 1 reply; 8+ messages in thread
From: Eric Biggers @ 2025-05-14 16:29 UTC (permalink / raw)
To: Herbert Xu
Cc: linux-crypto, linuxppc-dev, maddy, mpe, npiggin, christophe.leroy,
naveen, dtsen, segher, stable
On Wed, May 14, 2025 at 05:41:39PM +0800, Herbert Xu wrote:
> Eric Biggers <ebiggers@kernel.org> wrote:
> > From: Eric Biggers <ebiggers@google.com>
> >
> > As discussed in the thread containing
> > https://lore.kernel.org/linux-crypto/20250510053308.GB505731@sol/, the
> > Power10-optimized Poly1305 code is currently not safe to call in softirq
> > context. Disable it for now. It can be re-enabled once it is fixed.
> >
> > Fixes: ba8f8624fde2 ("crypto: poly1305-p10 - Glue code for optmized Poly1305 implementation for ppc64le")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
> > ---
> > arch/powerpc/lib/crypto/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
>
> I thought this fix should be enough, no?
>
> https://patchwork.kernel.org/project/linux-crypto/patch/aB8Yy0JGvoErc0ns@gondor.apana.org.au/
I didn't notice that. Probably, though I don't have time to review this subtle
Poly1305 code. Especially with all the weird unions in the code. Would be
great if the PowerPC folks would take a look.
- Eric
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] crypto: powerpc/poly1305 - add depends on BROKEN for now
2025-05-14 16:29 ` Eric Biggers
@ 2025-05-15 2:10 ` Herbert Xu
2025-05-19 13:55 ` Christophe Leroy
0 siblings, 1 reply; 8+ messages in thread
From: Herbert Xu @ 2025-05-15 2:10 UTC (permalink / raw)
To: Eric Biggers
Cc: linux-crypto, linuxppc-dev, maddy, mpe, npiggin, christophe.leroy,
naveen, dtsen, segher, stable
On Wed, May 14, 2025 at 09:29:33AM -0700, Eric Biggers wrote:
>
> I didn't notice that. Probably, though I don't have time to review this subtle
> Poly1305 code. Especially with all the weird unions in the code. Would be
> great if the PowerPC folks would take a look.
Of course more reviews would be great and I think they're all on
the cc list.
I did test this by manually forcing the conversion, which is how
I discovered that powerpc wasn't even using donna64.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] crypto: powerpc/poly1305 - add depends on BROKEN for now
2025-05-15 2:10 ` Herbert Xu
@ 2025-05-19 13:55 ` Christophe Leroy
2025-05-20 2:32 ` Herbert Xu
0 siblings, 1 reply; 8+ messages in thread
From: Christophe Leroy @ 2025-05-19 13:55 UTC (permalink / raw)
To: Herbert Xu, Eric Biggers
Cc: linux-crypto, linuxppc-dev, maddy, mpe, npiggin, naveen, dtsen,
segher, stable
Le 15/05/2025 à 04:10, Herbert Xu a écrit :
> On Wed, May 14, 2025 at 09:29:33AM -0700, Eric Biggers wrote:
>>
>> I didn't notice that. Probably, though I don't have time to review this subtle
>> Poly1305 code. Especially with all the weird unions in the code. Would be
>> great if the PowerPC folks would take a look.
>
> Of course more reviews would be great and I think they're all on
> the cc list.
>
> I did test this by manually forcing the conversion, which is how
> I discovered that powerpc wasn't even using donna64.
>
As far as I can see related patches found in linux-next tree were not
sent to linuxppc-dev@lists.ozlabs.org.
Could you resend them, and split out the introduction of
CONFIG_ARCH_SUPPORTS_INT128 from other parts of patch "crypto:
powerpc/poly1305 - Add SIMD fallback" and add the lib/tishift.S in the
patch which adds CONFIG_ARCH_SUPPORTS_INT128 ?
Thanks
Christophe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] crypto: powerpc/poly1305 - add depends on BROKEN for now
2025-05-19 13:55 ` Christophe Leroy
@ 2025-05-20 2:32 ` Herbert Xu
2025-05-20 5:17 ` Christophe Leroy
0 siblings, 1 reply; 8+ messages in thread
From: Herbert Xu @ 2025-05-20 2:32 UTC (permalink / raw)
To: Christophe Leroy
Cc: Eric Biggers, linux-crypto, linuxppc-dev, maddy, mpe, npiggin,
naveen, dtsen, segher, stable
On Mon, May 19, 2025 at 03:55:16PM +0200, Christophe Leroy wrote:
>
> As far as I can see related patches found in linux-next tree were not sent
> to linuxppc-dev@lists.ozlabs.org.
I just checked and it was definitely sent to linuxppc-dev:
Cc: oe-kbuild-all@lists.linux.dev, Linux Crypto Mailing List <linux-crypto@vger.kernel.org>, Venkat Rao Bagalkote <venkat88@linux.ibm.com>, Madhavan Srinivasan <maddy@linux.ibm.com>, Stephen Rothwell <sfr@canb.auug.org.au>, Danny Tsen <dtsen@linux.ibm.com>, linuxppc-dev@lists.ozlabs.org, Michael Ellerman <mpe@ellerman.id.au>
> Could you resend them, and split out the introduction of
> CONFIG_ARCH_SUPPORTS_INT128 from other parts of patch "crypto:
> powerpc/poly1305 - Add SIMD fallback" and add the lib/tishift.S in the patch
> which adds CONFIG_ARCH_SUPPORTS_INT128 ?
I'll just revert them and mark powerpc/poly1305 as broken. You
guys can sort it out later.
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] crypto: powerpc/poly1305 - add depends on BROKEN for now
2025-05-14 5:18 [PATCH] crypto: powerpc/poly1305 - add depends on BROKEN for now Eric Biggers
2025-05-14 9:41 ` Herbert Xu
@ 2025-05-20 2:41 ` Herbert Xu
1 sibling, 0 replies; 8+ messages in thread
From: Herbert Xu @ 2025-05-20 2:41 UTC (permalink / raw)
To: Eric Biggers
Cc: linux-crypto, linuxppc-dev, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Naveen N Rao, Danny Tsen,
Segher Boessenkool, stable
On Wed, May 14, 2025 at 05:18:47AM +0000, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> As discussed in the thread containing
> https://lore.kernel.org/linux-crypto/20250510053308.GB505731@sol/, the
> Power10-optimized Poly1305 code is currently not safe to call in softirq
> context. Disable it for now. It can be re-enabled once it is fixed.
>
> Fixes: ba8f8624fde2 ("crypto: poly1305-p10 - Glue code for optmized Poly1305 implementation for ppc64le")
> Cc: stable@vger.kernel.org
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
> arch/powerpc/lib/crypto/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] crypto: powerpc/poly1305 - add depends on BROKEN for now
2025-05-20 2:32 ` Herbert Xu
@ 2025-05-20 5:17 ` Christophe Leroy
0 siblings, 0 replies; 8+ messages in thread
From: Christophe Leroy @ 2025-05-20 5:17 UTC (permalink / raw)
To: Herbert Xu
Cc: Eric Biggers, linux-crypto, linuxppc-dev, maddy, mpe, npiggin,
naveen, dtsen, segher, stable
Le 20/05/2025 à 04:32, Herbert Xu a écrit :
> On Mon, May 19, 2025 at 03:55:16PM +0200, Christophe Leroy wrote:
>>
>> As far as I can see related patches found in linux-next tree were not sent
>> to linuxppc-dev@lists.ozlabs.org.
>
> I just checked and it was definitely sent to linuxppc-dev:
Oops sorry, my mistake.
I see them in patchwork, they still have status 'New'.
>
> Cc: oe-kbuild-all@lists.linux.dev, Linux Crypto Mailing List <linux-crypto@vger.kernel.org>, Venkat Rao Bagalkote <venkat88@linux.ibm.com>, Madhavan Srinivasan <maddy@linux.ibm.com>, Stephen Rothwell <sfr@canb.auug.org.au>, Danny Tsen <dtsen@linux.ibm.com>, linuxppc-dev@lists.ozlabs.org, Michael Ellerman <mpe@ellerman.id.au>
>
>> Could you resend them, and split out the introduction of
>> CONFIG_ARCH_SUPPORTS_INT128 from other parts of patch "crypto:
>> powerpc/poly1305 - Add SIMD fallback" and add the lib/tishift.S in the patch
>> which adds CONFIG_ARCH_SUPPORTS_INT128 ?
>
> I'll just revert them and mark powerpc/poly1305 as broken. You
> guys can sort it out later.
Fine, lets do that and make sure all necessary bits are there when
enabling CONFIG_ARCH_SUPPORTS_INT128
Thanks
Christophe
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-05-20 5:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-14 5:18 [PATCH] crypto: powerpc/poly1305 - add depends on BROKEN for now Eric Biggers
2025-05-14 9:41 ` Herbert Xu
2025-05-14 16:29 ` Eric Biggers
2025-05-15 2:10 ` Herbert Xu
2025-05-19 13:55 ` Christophe Leroy
2025-05-20 2:32 ` Herbert Xu
2025-05-20 5:17 ` Christophe Leroy
2025-05-20 2:41 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).