linux-yocto/arch/arm64/lib
Eric Biggers 6e36be511d crypto: arm64/sha256 - implement library instead of shash
Instead of providing crypto_shash algorithms for the arch-optimized
SHA-256 code, instead implement the SHA-256 library.  This is much
simpler, it makes the SHA-256 library functions be arch-optimized, and
it fixes the longstanding issue where the arch-optimized SHA-256 was
disabled by default.  SHA-256 still remains available through
crypto_shash, but individual architectures no longer need to handle it.

Remove support for SHA-256 finalization from the ARMv8 CE assembly code,
since the library does not yet support architecture-specific overrides
of the finalization.  (Support for that has been omitted for now, for
simplicity and because usually it isn't performance-critical.)

To match sha256_blocks_arch(), change the type of the nblocks parameter
of the assembly functions from int or 'unsigned int' to size_t.  Update
the ARMv8 CE assembly function accordingly.  The scalar and NEON
assembly functions actually already treated it as size_t.

While renaming the assembly files, also fix the naming quirks where
"sha2" meant sha256, and "sha512" meant both sha256 and sha512.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2025-05-05 18:20:43 +08:00
..
crypto crypto: arm64/sha256 - implement library instead of shash 2025-05-05 18:20:43 +08:00
clear_page.S arm64: lib: Use MOPS for copy_page() and clear_page() 2024-10-17 16:42:51 +01:00
clear_user.S arm64: lib: Use MOPS for usercopy routines 2025-03-07 18:30:16 +00:00
copy_from_user.S arm64: lib: Use MOPS for usercopy routines 2025-03-07 18:30:16 +00:00
copy_page.S arm64: lib: Use MOPS for copy_page() and clear_page() 2024-10-17 16:42:51 +01:00
copy_template.S arm64: lib: Use MOPS for usercopy routines 2025-03-07 18:30:16 +00:00
copy_to_user.S arm64: lib: Use MOPS for usercopy routines 2025-03-07 18:30:16 +00:00
crc-t10dif-core.S arm64/crc-t10dif: expose CRC-T10DIF function through lib 2024-12-01 17:23:13 -08:00
crc-t10dif-glue.c arm64/crc-t10dif: fix use of out-of-scope array in crc_t10dif_arch() 2025-03-26 14:04:43 -07:00
crc32-glue.c lib/crc32: remove "_le" from crc32c base and arch functions 2025-02-08 20:06:30 -08:00
crc32.S arm64/crc32: Implement 4-way interleave using PMULL 2024-10-22 11:54:43 +01:00
csum.c arm64: csum: Fix OoB access in IP checksum code for negative lengths 2023-09-07 10:15:20 +01:00
delay.c arm64: Avoid cpus_have_const_cap() for ARM64_HAS_WFXT 2023-10-16 14:17:05 +01:00
error-inject.c arm64: Add support for function error injection 2019-08-07 13:53:09 +01:00
insn.c arm64: insn: Add load-acquire and store-release instructions 2025-03-15 11:48:29 -07:00
kasan_sw_tags.S arm64: Use BTI C directly and unconditionally 2021-12-14 18:12:58 +00:00
Makefile crypto: arm64 - move library functions to arch/arm64/lib/crypto/ 2025-04-28 19:40:53 +08:00
memchr.S arm64: clean up symbol aliasing 2022-02-22 16:21:34 +00:00
memcmp.S arm64: clean up symbol aliasing 2022-02-22 16:21:34 +00:00
memcpy.S arm64: lib: Use MOPS for memcpy() routines 2024-10-17 16:42:51 +01:00
memset.S arm64: lib: Use MOPS for memcpy() routines 2024-10-17 16:42:51 +01:00
mte.S arm64/sysreg: Remove duplicate definitions from asm/sysreg.h 2022-12-01 17:31:12 +00:00
strchr.S arm64: clean up symbol aliasing 2022-02-22 16:21:34 +00:00
strcmp.S Merge branch 'for-next/strings' into for-next/core 2022-03-14 19:02:52 +00:00
strlen.S arm64: clean up symbol aliasing 2022-02-22 16:21:34 +00:00
strncmp.S Merge branch 'for-next/strings' into for-next/core 2022-03-14 19:02:52 +00:00
strnlen.S arm64: clean up symbol aliasing 2022-02-22 16:21:34 +00:00
strrchr.S arm64: clean up symbol aliasing 2022-02-22 16:21:34 +00:00
tishift.S arm64: lib: Use modern annotations for assembly functions 2020-01-08 12:23:02 +00:00
uaccess_flushcache.c arm: uaccess: Remove memcpy_page_flushcache() 2023-03-27 16:26:19 +01:00
xor-neon.c arm64: xor-neon: mark xor_arm64_neon_*() static 2023-05-25 17:44:01 +01:00