From: Eric Biggers <ebiggers@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: linux-crypto@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com
Subject: Re: [PATCH 0/3] Test CRC computation in interrupt contexts
Date: Wed, 20 Aug 2025 23:37:06 -0400 [thread overview]
Message-ID: <20250821033706.GC185832@quark> (raw)
In-Reply-To: <20250811182631.376302-1-ebiggers@kernel.org>
On Mon, Aug 11, 2025 at 11:26:28AM -0700, Eric Biggers wrote:
> 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
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=crc-next
But, reviews and acks would be greatly appreciated!
- Eric
prev parent reply other threads:[~2025-08-21 3:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 18:26 [PATCH 0/3] Test CRC computation in interrupt contexts Eric Biggers
2025-08-11 18:26 ` [PATCH 1/3] kunit, lib/crypto: Move run_irq_test() to common header Eric Biggers
2025-08-11 18:26 ` [PATCH 2/3] lib/crc: crc_kunit: Test CRC computation in interrupt contexts Eric Biggers
2025-08-11 18:26 ` [PATCH 3/3] lib/crc: Use underlying functions instead of crypto_simd_usable() Eric Biggers
2025-08-21 3:37 ` Eric Biggers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250821033706.GC185832@quark \
--to=ebiggers@kernel.org \
--cc=ardb@kernel.org \
--cc=kunit-dev@googlegroups.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox