BACKPORT: FROMLIST: dm-verity: always "map" the data blocks
dm-verity needs to access data blocks by virtual address in three different cases (zeroization, recheck, and forward error correction), and one more case (shash support) is coming. Since it's guaranteed that dm-verity data blocks never cross pages, and kmap_local_page and kunmap_local are no-ops on modern platforms anyway, just unconditionally "map" every data block's page and work with the virtual buffer directly. This simplifies the code and eliminates unnecessary overhead. Reviewed-by:Sami Tolvanen <samitolvanen@google.com> Acked-by:
Ard Biesheuvel <ardb@kernel.org> Signed-off-by:
Eric Biggers <ebiggers@google.com> Bug: 330611177 Link: https://lore.kernel.org/r/20240621165922.77672-12-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: Iee9a4a7fbe5ebb21fc4c594c9860a6c5236d8ad4 Signed-off-by:
Eric Biggers <ebiggers@google.com>
Loading
Please sign in to comment