From 5d0f0e57ed900917836385527ce5b122fa1425a3 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Fri, 27 Jan 2023 14:15:29 -0800 Subject: fsverity: support verifying data from large folios Try to make fs/verity/verify.c aware of large folios. This includes making fsverity_verify_bio() support the case where the bio contains large folios, and adding a function fsverity_verify_folio() which is the equivalent of fsverity_verify_page(). There's no way to actually test this with large folios yet, but I've tested that this doesn't cause any regressions. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20230127221529.299560-1-ebiggers@kernel.org --- fs/buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/buffer.c') diff --git a/fs/buffer.c b/fs/buffer.c index 2e65ba2b3919..8499c79ae13d 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -308,7 +308,8 @@ static void verify_bh(struct work_struct *work) struct buffer_head *bh = ctx->bh; bool valid; - valid = fsverity_verify_blocks(bh->b_page, bh->b_size, bh_offset(bh)); + valid = fsverity_verify_blocks(page_folio(bh->b_page), bh->b_size, + bh_offset(bh)); end_buffer_async_read(bh, valid); kfree(ctx); } -- cgit v1.2.3