mirror-linux/arch/powerpc
Eric Biggers 73f315c15d lib/crypto: powerpc/ghash: Migrate optimized code into library
Remove the "p8_ghash" crypto_shash algorithm.  Move the corresponding
assembly code into lib/crypto/, and wire it up to the GHASH library.

This makes the GHASH library be optimized for POWER8.  It also greatly
reduces the amount of powerpc-specific glue code that is needed, and it
fixes the issue where this optimized GHASH code was disabled by default.

Note that previously the C code defined the POWER8 GHASH key format as
"u128 htable[16]", despite the assembly code only using four entries.
Fix the C code to use the correct key format.  To fulfill the library
API contract, also make the key preparation work in all contexts.

Note that the POWER8 assembly code takes the accumulator in GHASH
format, but it actually byte-reflects it to get it into POLYVAL format.
The library already works with POLYVAL natively.  For now, just wire up
this existing code by converting it to/from GHASH format in C code.
This should be cleaned up to eliminate the unnecessary conversion later.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20260319061723.1140720-12-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-03-23 16:44:29 -07:00
..
boot powerpc updates for 6.19 2025-12-05 16:18:21 -08:00
configs mm.git review status for linus..mm-nonmm-stable 2026-02-12 12:13:01 -08:00
crypto lib/crypto: powerpc/ghash: Migrate optimized code into library 2026-03-23 16:44:29 -07:00
include mm.git review status for linus..mm-stable 2026-02-12 11:32:37 -08:00
kernel Second round of Kbuild fixes for 7.0 2026-03-06 20:27:13 -08:00
kexec powerpc/kexec: Enable SMT before waking offline CPUs 2025-12-22 17:53:37 +05:30
kvm KVM: always define KVM_CAP_SYNC_MMU 2026-02-28 15:31:35 +01:00
lib treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
math-emu
mm Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
net Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
perf Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
platforms Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
purgatory
sysdev Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
tools powerpc/tools: drop `-o pipefail` in gcc check scripts 2025-12-22 17:56:34 +05:30
xmon powerpc/xmon: replace sizeof calculations with ARRAY_SIZE macro 2025-09-01 13:40:46 +05:30
Kbuild powerpc64/ftrace: Move ftrace sequence out of line 2024-10-31 11:00:54 +11:00
Kconfig mm.git review status for linus..mm-stable 2026-02-12 11:32:37 -08:00
Kconfig.debug powerpc: Remove UDBG_RTAS_CONSOLE 2025-02-26 21:15:09 +05:30
Makefile kbuild: Add missing $(objtree) prefix to powerpc crtsavres.o artifact 2025-09-01 13:41:57 +05:30
Makefile.postlink powerpc/ftrace: Add a postlink script to validate function tracer 2024-10-31 11:00:54 +11:00