[PATCH 0/5] lib/crypto: Poly1305 fixes

Eric Biggers posted 5 patches 3 months ago
lib/crypto/arm/poly1305-glue.c   |  8 ++----
lib/crypto/arm64/poly1305-glue.c |  3 +-
lib/crypto/x86/poly1305_glue.c   | 48 +++++++++++++++++++++++++++++++-
3 files changed, 51 insertions(+), 8 deletions(-)
[PATCH 0/5] lib/crypto: Poly1305 fixes
Posted by Eric Biggers 3 months ago
This series is also available at:                                                                        
                                                                        
    git fetch https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git poly1305-fixes

This series fixes the arm, arm64, and x86 Poly1305 functions to not
corrupt random tasks' registers when called in the "wrong" context.  It
also fixes a performance regression on x86 with short messages.

This series is needed for my upcoming poly1305_kunit test to pass.

Eric Biggers (5):
  lib/crypto: arm/poly1305: Remove unneeded empty weak function
  lib/crypto: arm/poly1305: Fix register corruption in no-SIMD contexts
  lib/crypto: arm64/poly1305: Fix register corruption in no-SIMD
    contexts
  lib/crypto: x86/poly1305: Fix register corruption in no-SIMD contexts
  lib/crypto: x86/poly1305: Fix performance regression on short messages

 lib/crypto/arm/poly1305-glue.c   |  8 ++----
 lib/crypto/arm64/poly1305-glue.c |  3 +-
 lib/crypto/x86/poly1305_glue.c   | 48 +++++++++++++++++++++++++++++++-
 3 files changed, 51 insertions(+), 8 deletions(-)


base-commit: f1da28dfadd26ef95bbd0b1ddf066e7ffe1505ff
-- 
2.50.0
Re: [PATCH 0/5] lib/crypto: Poly1305 fixes
Posted by Eric Biggers 2 months, 4 weeks ago
On Sun, Jul 06, 2025 at 04:10:55PM -0700, Eric Biggers wrote:
> This series is also available at:                                                                        
>                                                                         
>     git fetch https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git poly1305-fixes
> 
> This series fixes the arm, arm64, and x86 Poly1305 functions to not
> corrupt random tasks' registers when called in the "wrong" context.  It
> also fixes a performance regression on x86 with short messages.
> 
> This series is needed for my upcoming poly1305_kunit test to pass.
> 
> Eric Biggers (5):
>   lib/crypto: arm/poly1305: Remove unneeded empty weak function
>   lib/crypto: arm/poly1305: Fix register corruption in no-SIMD contexts
>   lib/crypto: arm64/poly1305: Fix register corruption in no-SIMD
>     contexts
>   lib/crypto: x86/poly1305: Fix register corruption in no-SIMD contexts
>   lib/crypto: x86/poly1305: Fix performance regression on short messages
> 
>  lib/crypto/arm/poly1305-glue.c   |  8 ++----
>  lib/crypto/arm64/poly1305-glue.c |  3 +-
>  lib/crypto/x86/poly1305_glue.c   | 48 +++++++++++++++++++++++++++++++-
>  3 files changed, 51 insertions(+), 8 deletions(-)
> 
> 
> base-commit: f1da28dfadd26ef95bbd0b1ddf066e7ffe1505ff

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-next

- Eric
Re: [PATCH 0/5] lib/crypto: Poly1305 fixes
Posted by Ard Biesheuvel 3 months ago
On Mon, 7 Jul 2025 at 09:11, Eric Biggers <ebiggers@kernel.org> wrote:
>
> This series is also available at:
>
>     git fetch https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git poly1305-fixes
>
> This series fixes the arm, arm64, and x86 Poly1305 functions to not
> corrupt random tasks' registers when called in the "wrong" context.  It
> also fixes a performance regression on x86 with short messages.
>
> This series is needed for my upcoming poly1305_kunit test to pass.
>
> Eric Biggers (5):
>   lib/crypto: arm/poly1305: Remove unneeded empty weak function
>   lib/crypto: arm/poly1305: Fix register corruption in no-SIMD contexts
>   lib/crypto: arm64/poly1305: Fix register corruption in no-SIMD
>     contexts
>   lib/crypto: x86/poly1305: Fix register corruption in no-SIMD contexts
>   lib/crypto: x86/poly1305: Fix performance regression on short messages
>

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>

>  lib/crypto/arm/poly1305-glue.c   |  8 ++----
>  lib/crypto/arm64/poly1305-glue.c |  3 +-
>  lib/crypto/x86/poly1305_glue.c   | 48 +++++++++++++++++++++++++++++++-
>  3 files changed, 51 insertions(+), 8 deletions(-)
>
>
> base-commit: f1da28dfadd26ef95bbd0b1ddf066e7ffe1505ff
> --
> 2.50.0
>