summaryrefslogtreecommitdiff
path: root/scripts/extract-fwblobs
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2025-09-15 11:08:19 -0500
committerEric Biggers <ebiggers@kernel.org>2025-09-17 13:10:04 -0500
commita1f692fd69ccdbe1e492d366788b63227d429753 (patch)
tree470a18085c91c72d4f2873b5a05b81637c2ef532 /scripts/extract-fwblobs
parent4bd70b53bd7d554d402b2d8f5972a54e39a2e5ab (diff)
fsverity: Use 2-way interleaved SHA-256 hashing when supported
When the crypto library provides an optimized implementation of sha256_finup_2x(), use it to interleave the hashing of pairs of data blocks. On some CPUs this nearly doubles hashing performance. The increase in overall throughput of cold-cache fsverity reads that I'm seeing on arm64 and x86_64 is roughly 35% (though this metric is hard to measure as it jumps around a lot). For now this is only done on the verification path, and only for data blocks, not Merkle tree blocks. We could use sha256_finup_2x() on Merkle tree blocks too, but that is less important as there aren't as many Merkle tree blocks as data blocks, and that would require some additional code restructuring. We could also use sha256_finup_2x() to accelerate building the Merkle tree, but verification performance is more important. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20250915160819.140019-7-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'scripts/extract-fwblobs')
0 files changed, 0 insertions, 0 deletions