crypto: crc32c - Provide crc32c-arch driver for accelerated library code
authorArd Biesheuvel <ardb@kernel.org>
Wed, 16 Oct 2024 18:57:25 +0000 (20:57 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 28 Oct 2024 10:33:10 +0000 (18:33 +0800)
commit16739efac6e1ea40df5ec7a263e664481840e73a
tree64d7be952eae4f4db83d2bb244f3b777b9f7a90f
parenta37e55791f204bd65da07d281d95629df15ccf81
crypto: crc32c - Provide crc32c-arch driver for accelerated library code

crc32c-generic is currently backed by the architecture's CRC-32c library
code, which may offer a variety of implementations depending on the
capabilities of the platform. These are not covered by the crypto
subsystem's fuzz testing capabilities because crc32c-generic is the
reference driver that the fuzzing logic uses as a source of truth.

Fix this by providing a crc32c-arch implementation which is based on the
arch library code if available, and modify crc32c-generic so it is
always based on the generic C implementation. If the arch has no CRC-32c
library code, this change does nothing.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/Makefile
crypto/crc32c_generic.c
lib/crc32.c