linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Optimize dm-verity using 2-way interleaved SHA-256 hashing
@ 2025-10-14 21:16 Eric Biggers
  2025-10-14 21:16 ` [PATCH 1/4] dm-verity: remove log message with shash driver name Eric Biggers
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Eric Biggers @ 2025-10-14 21:16 UTC (permalink / raw)
  To: dm-devel, Alasdair Kergon, Mike Snitzer, Mikulas Patocka
  Cc: linux-crypto, linux-kernel, Eric Biggers

This series makes dm-verity take advantage of the 2-way interleaved
SHA-256 hashing code that was added in 6.18.  fsverity already does
this; this brings the same optimization to dm-verity.  This increases
SHA-256 hashing throughput by up to 98% on x86_64 and 70% on arm64.

To make this possible, this series makes dm-verity use the SHA-256
library when the hash algorithm is SHA-256 (which it usually is).  That
actually provides a ~2% performance improvement by itself, in addition
to the larger improvement from interleaved hashing on x86_64 and arm64.

As usual, I verified that 'verity-compat-test' still passes.

This series is targeting linux-dm/for-next.

Eric Biggers (4):
  dm-verity: remove log message with shash driver name
  dm-verity: use SHA-256 library for SHA-256
  dm-verity: reduce scope of real and wanted digests
  dm-verity: use 2-way interleaved SHA-256 hashing when supported

 drivers/md/Kconfig            |   1 +
 drivers/md/dm-verity-fec.c    |  21 ++--
 drivers/md/dm-verity-fec.h    |   5 +-
 drivers/md/dm-verity-target.c | 203 +++++++++++++++++++++++++---------
 drivers/md/dm-verity.h        |  52 +++++----
 5 files changed, 196 insertions(+), 86 deletions(-)


base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
-- 
2.51.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-14 21:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-14 21:16 [PATCH 0/4] Optimize dm-verity using 2-way interleaved SHA-256 hashing Eric Biggers
2025-10-14 21:16 ` [PATCH 1/4] dm-verity: remove log message with shash driver name Eric Biggers
2025-10-14 21:16 ` [PATCH 2/4] dm-verity: use SHA-256 library for SHA-256 Eric Biggers
2025-10-14 21:16 ` [PATCH 3/4] dm-verity: reduce scope of real and wanted digests Eric Biggers
2025-10-14 21:16 ` [PATCH 4/4] dm-verity: use 2-way interleaved SHA-256 hashing when supported Eric Biggers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).