diff options
author | Eric Biggers <ebiggers@google.com> | 2022-12-23 21:36:32 +0100 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2023-01-10 04:06:01 +0100 |
commit | f45555bf23cfc6bf0f0239de321221b1b81817ab (patch) | |
tree | 8b3f08dfb3f0d25ab648268315840f75e1382675 /fs/verity/enable.c | |
parent | fsverity: use EFBIG for file too large to enable verity (diff) | |
download | linux-f45555bf23cfc6bf0f0239de321221b1b81817ab.tar.xz linux-f45555bf23cfc6bf0f0239de321221b1b81817ab.zip |
fsverity: replace fsverity_hash_page() with fsverity_hash_block()
In preparation for allowing the Merkle tree block size to differ from
PAGE_SIZE, replace fsverity_hash_page() with fsverity_hash_block(). The
new function is similar to the old one, but it operates on the block at
the given offset in the page instead of on the full page.
(For now, all callers still pass a full page.)
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Andrey Albershteyn <aalbersh@redhat.com>
Tested-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://lore.kernel.org/r/20221223203638.41293-6-ebiggers@kernel.org
Diffstat (limited to 'fs/verity/enable.c')
-rw-r--r-- | fs/verity/enable.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/verity/enable.c b/fs/verity/enable.c index 8a9189d47983..144483319f1a 100644 --- a/fs/verity/enable.c +++ b/fs/verity/enable.c @@ -99,8 +99,8 @@ static int build_merkle_tree_level(struct file *filp, unsigned int level, } } - err = fsverity_hash_page(params, inode, req, src_page, - &pending_hashes[pending_size]); + err = fsverity_hash_block(params, inode, req, src_page, 0, + &pending_hashes[pending_size]); put_page(src_page); if (err) return err; |