Skip to content

Test CRC computation in interrupt contexts

Eric Biggers linux-crypto linux-kselftest lkml 1 version Applied

Status from this message: Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=crc-next

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3kunit, lib/crypto: Move run_irq_test() to common headerinclude/kunit/run-in-irq-context.h lib/crypto/tests/hash-test-template.h+133 -1190 replies
2/3lib/crc: crc_kunit: Test CRC computation in interrupt contextslib/crc/tests/crc_kunit.c+53 -90 replies
3/3lib/crc: Use underlying functions instead of crypto_simd_usable()lib/crc/arm/crc-t10dif.h lib/crc/arm/crc32.h lib/crc/arm64/crc-t10dif.h +5 more+20 -240 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Test CRC computation in interrupt contexts

This series updates crc_kunit to use the same interrupt context testing strategy that I used in the crypto KUnit tests. I.e., test CRC computation in hardirq, softirq, and task context concurrently. This detect issues related to use of the FPU/SIMD/vector registers.

To allow lib/crc/tests/ and lib/crypto/tests/ to share code, move the needed helper function to include/kunit/run-in-irq-context.h. include/kunit/ seems like the most relevant location for this sort of thing, but let me know if there is any other preference.

The third patch replaces the calls to crypto_simd_usable() in lib/crc/ with calls to the underlying functions, now that we have a better solution that doesn't rely on the test injecting values. (Note that crc_kunit wasn't actually using the injection solution, anyway.)

I'd like to take this series via crc-next.

Eric Biggers (3):
kunit, lib/crypto: Move run_irq_test() to common header lib/crc: crc_kunit: Test CRC computation in interrupt contexts lib/crc: Use underlying functions instead of crypto_simd_usable()

 include/kunit/run-in-irq-context.h    | 129 ++++++++++++++++++++++++++
 lib/crc/arm/crc-t10dif.h              |   6 +-
 lib/crc/arm/crc32.h                   |   6 +-
 lib/crc/arm64/crc-t10dif.h            |   6 +-
 lib/crc/arm64/crc32.h                 |  11 ++-
 lib/crc/powerpc/crc-t10dif.h          |   5 +-
 lib/crc/powerpc/crc32.h               |   5 +-
 lib/crc/tests/crc_kunit.c             |  62 +++++++++++--
 lib/crc/x86/crc-pclmul-template.h     |   3 +-
 lib/crc/x86/crc32.h                   |   2 +-
 lib/crypto/tests/hash-test-template.h | 123 +-----------------------
 11 files changed, 206 insertions(+), 152 deletions(-)
 create mode 100644 include/kunit/run-in-irq-context.h

base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585

Signature · 1 line
2.50.1