]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dm-verity: always "map" the data blocks
authorEric Biggers <ebiggers@kernel.org>
Tue, 2 Jul 2024 14:40:20 +0000 (16:40 +0200)
committerMikulas Patocka <mpatocka@redhat.com>
Wed, 3 Jul 2024 19:41:11 +0000 (21:41 +0200)
commitcf715f4b7eb521a5bf67d391387b754c2fcde8d2
treef4120fa330529bd10a023d953b1e9764d55ba145
parent09d1430896e38933470045408d7a350dac7d841b
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>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-verity-fec.c
drivers/md/dm-verity-fec.h
drivers/md/dm-verity-target.c
drivers/md/dm-verity.h