diff options
author | Eric Biggers <ebiggers@kernel.org> | 2025-07-06 16:10:59 -0700 |
---|---|---|
committer | Eric Biggers <ebiggers@kernel.org> | 2025-07-11 14:29:42 -0700 |
commit | 16f2c30e290e04135b70ad374fb7e1d1ed9ff5e7 (patch) | |
tree | 7d5bef2300f928fcdc48ac3b7a55ad484889e59c /scripts/lib/kdoc/kdoc_files.py | |
parent | eec76ea5a7213c48529a46eed1b343e5cee3aaab (diff) |
lib/crypto: x86/poly1305: Fix register corruption in no-SIMD contexts
Restore the SIMD usability check and base conversion that were removed
by commit 318c53ae02f2 ("crypto: x86/poly1305 - Add block-only
interface").
This safety check is cheap and is well worth eliminating a footgun.
While the Poly1305 functions should not be called when SIMD registers
are unusable, if they are anyway, they should just do the right thing
instead of corrupting random tasks' registers and/or computing incorrect
MACs. Fixing this is also needed for poly1305_kunit to pass.
Just use irq_fpu_usable() instead of the original crypto_simd_usable(),
since poly1305_kunit won't rely on crypto_simd_disabled_for_test.
Fixes: 318c53ae02f2 ("crypto: x86/poly1305 - Add block-only interface")
Cc: stable@vger.kernel.org
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250706231100.176113-5-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions