mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 16:12:02 +00:00
9924003807
As far as I can tell, "crc32c-sparc64" is the only "shash" algorithm in the kernel that sets a nonzero alignmask and actually relies on it to get the crypto API to align the inputs and outputs. This capability is not really useful, though. To unblock removing the support for alignmask from shash_alg, this patch updates crc32c-sparc64 to no longer use the alignmask. This means doing 8-byte alignment of the data when doing an update, using get_unaligned_le32() when setting a non-default initial CRC, and using put_unaligned_le32() to output the final CRC. Partially tested with: export ARCH=sparc64 CROSS_COMPILE=sparc64-linux-gnu- make sparc64_defconfig echo CONFIG_CRYPTO_CRC32C_SPARC64=y >> .config echo '# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set' >> .config echo CONFIG_DEBUG_KERNEL=y >> .config echo CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y >> .config make olddefconfig make -j$(getconf _NPROCESSORS_ONLN) qemu-system-sparc64 -kernel arch/sparc/boot/image -nographic However, qemu doesn't actually support the sparc CRC32C instructions, so for the test I temporarily replaced crc32c_sparc64() with __crc32c_le() and made sparc64_has_crc32c_opcode() always return true. So essentially I tested the glue code, not the actual SPARC part which is unchanged. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> |
||
---|---|---|
.. | ||
aes_asm.S | ||
aes_glue.c | ||
camellia_asm.S | ||
camellia_glue.c | ||
crc32c_asm.S | ||
crc32c_glue.c | ||
crop_devid.c | ||
des_asm.S | ||
des_glue.c | ||
Kconfig | ||
Makefile | ||
md5_asm.S | ||
md5_glue.c | ||
opcodes.h | ||
sha1_asm.S | ||
sha1_glue.c | ||
sha256_asm.S | ||
sha256_glue.c | ||
sha512_asm.S | ||
sha512_glue.c |