lib/crypto: powerpc/aes: Fix rndkey_from_vsx() on big endian CPUs
authorEric Biggers <ebiggers@kernel.org>
Mon, 16 Feb 2026 02:21:04 +0000 (18:21 -0800)
committerEric Biggers <ebiggers@kernel.org>
Wed, 18 Feb 2026 21:38:14 +0000 (13:38 -0800)
commitbeeebffc807531f69445356180238500f56951cc
tree534735d059d08da1684a366188c2584b25437082
parent23b0f90ba871f096474e1c27c3d14f455189d2d9
lib/crypto: powerpc/aes: Fix rndkey_from_vsx() on big endian CPUs

I finally got a big endian PPC64 kernel to boot in QEMU.  The PPC64 VSX
optimized AES library code does work in that case, with the exception of
rndkey_from_vsx() which doesn't take into account that the order in
which the VSX code stores the round key words depends on the endianness.
So fix rndkey_from_vsx() to do the right thing on big endian CPUs.

Fixes: 7cf2082e74ce ("lib/crypto: powerpc/aes: Migrate POWER8 optimized code into library")
Link: https://lore.kernel.org/r/20260216022104.332991-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
lib/crypto/powerpc/aes.h