ext4: add fs-verity read support
authorEric Biggers <ebiggers@google.com>
Mon, 22 Jul 2019 16:26:24 +0000 (09:26 -0700)
committerEric Biggers <ebiggers@google.com>
Tue, 13 Aug 2019 02:33:51 +0000 (19:33 -0700)
commit22cfe4b48ccb5a3dbb92d6dcb88f396e0f400f74
treea542a34c4ff891e8b361b18c55602304e6487371
parentc93d8f88580921c84d2213161ef3c22560511b84
ext4: add fs-verity read support

Make ext4_mpage_readpages() verify data as it is read from fs-verity
files, using the helper functions from fs/verity/.

To support both encryption and verity simultaneously, this required
refactoring the decryption workflow into a generic "post-read
processing" workflow which can do decryption, verification, or both.

The case where the ext4 block size is not equal to the PAGE_SIZE is not
supported yet, since in that case ext4_mpage_readpages() sometimes falls
back to block_read_full_page(), which does not support fs-verity yet.

Co-developed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eric Biggers <ebiggers@google.com>
fs/ext4/ext4.h
fs/ext4/inode.c
fs/ext4/readpage.c
fs/ext4/super.c