From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org, fsverity@lists.linux.dev
Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
"Jason A . Donenfeld" <Jason@zx2c4.com>,
x86@kernel.org, Sami Tolvanen <samitolvanen@google.com>,
Mikulas Patocka <mpatocka@redhat.com>,
linux-arm-kernel@lists.infradead.org,
Eric Biggers <ebiggers@kernel.org>
Subject: [PATCH 0/6] Optimize fsverity using 2-way interleaved SHA-256 hashing
Date: Tue, 9 Sep 2025 16:13:20 -0700 [thread overview]
Message-ID: <20250909231326.1074672-1-ebiggers@kernel.org> (raw)
This series is targeting libcrypto-next. It can also be retrieved from:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git sha256_finup_2x-v1
This series adds support for 2-way interleaved SHA-256 hashing to
lib/crypto/, implements it for arm64 and x86_64, and makes fsverity use
it. This significantly improves fsverity performance on many CPUs.
Later patches will make dm-verity use this optimization as well.
Eric Biggers (6):
lib/crypto: sha256: Add support for 2-way interleaved hashing
lib/crypto: arm64/sha256: Add support for 2-way interleaved hashing
lib/crypto: x86/sha256: Add support for 2-way interleaved hashing
lib/crypto: tests: Add tests and benchmark for sha256_finup_2x()
fsverity: Remove inode parameter from fsverity_hash_block()
fsverity: Use 2-way interleaved SHA-256 hashing when supported
fs/verity/enable.c | 12 +-
fs/verity/fsverity_private.h | 2 +-
fs/verity/hash_algs.c | 3 +-
fs/verity/verify.c | 175 ++++++++++++---
include/crypto/sha2.h | 24 +++
lib/crypto/arm64/sha256-ce.S | 281 +++++++++++++++++++++++-
lib/crypto/arm64/sha256.h | 37 ++++
lib/crypto/sha256.c | 66 +++++-
lib/crypto/tests/sha256_kunit.c | 184 ++++++++++++++++
lib/crypto/x86/sha256-ni-asm.S | 368 ++++++++++++++++++++++++++++++++
lib/crypto/x86/sha256.h | 39 ++++
11 files changed, 1136 insertions(+), 55 deletions(-)
base-commit: 54e7bb6ade8acd3fb1c486c9f3e2c0dfdc18f84e
--
2.50.1
next reply other threads:[~2025-09-09 23:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 23:13 Eric Biggers [this message]
2025-09-09 23:13 ` [PATCH 1/6] lib/crypto: sha256: Add support for 2-way interleaved hashing Eric Biggers
2025-09-09 23:13 ` [PATCH 2/6] lib/crypto: arm64/sha256: " Eric Biggers
2025-09-09 23:13 ` [PATCH 3/6] lib/crypto: x86/sha256: " Eric Biggers
2025-09-09 23:13 ` [PATCH 4/6] lib/crypto: tests: Add tests and benchmark for sha256_finup_2x() Eric Biggers
2025-09-09 23:13 ` [PATCH 5/6] fsverity: Remove inode parameter from fsverity_hash_block() Eric Biggers
2025-09-09 23:13 ` [PATCH 6/6] fsverity: Use 2-way interleaved SHA-256 hashing when supported Eric Biggers
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=20250909231326.1074672-1-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=fsverity@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=samitolvanen@google.com \
--cc=x86@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