Commit 6c33cbb4 authored by Eric Biggers's avatar Eric Biggers Committed by William McVicker
Browse files

BACKPORT: FROMLIST: dm-verity: reduce scope of real and wanted digests



In preparation for supporting multibuffer hashing where dm-verity will
need to keep track of the real and wanted digests for multiple data
blocks simultaneously, stop using the want_digest and real_digest fields
of struct dm_verity_io from so many different places.  Specifically:

- Make various functions take want_digest as a parameter rather than
  having it be implicitly passed via the struct dm_verity_io.

- Add a new tmp_digest field, and use this instead of real_digest when
  computing a hash solely for the purpose of immediately checking it.

The result is that real_digest and want_digest are used only by
verity_verify_io().

Reviewed-by: default avatarSami Tolvanen <samitolvanen@google.com>
Acked-by: default avatarArd Biesheuvel <ardb@kernel.org>
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>

Bug: 330611177
Link: https://lore.kernel.org/r/20240621165922.77672-15-ebiggers@kernel.org


(resolved conflict due to missing the upstream commit
 "dm-verity: Convert from tasklet to BH workqueue", which is hard to
 cherry-pick because it depends on workqueue subsystem changes)
Change-Id: I1d417ed3f79d9bcf11c09128e653e695dc25081e
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
parent 3503ed6f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment