fs-verity: add data verification hooks for ->readpages()
Add functions that verify data pages that have been read from a fs-verity file, against that file's Merkle tree. These will be called from filesystems' ->readpage() and ->readpages() methods. Since data verification can block, a workqueue is provided for these methods to enqueue verification work from their bio completion callback. See the "Verifying data" section of Documentation/filesystems/fsverity.rst for more information. Reviewed-by:Theodore Ts'o <tytso@mit.edu> Reviewed-by:
Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by:
Eric Biggers <ebiggers@google.com>
Showing
- fs/verity/Makefile 2 additions, 1 deletionfs/verity/Makefile
- fs/verity/fsverity_private.h 5 additions, 0 deletionsfs/verity/fsverity_private.h
- fs/verity/init.c 8 additions, 0 deletionsfs/verity/init.c
- fs/verity/open.c 6 additions, 0 deletionsfs/verity/open.c
- fs/verity/verify.c 275 additions, 0 deletionsfs/verity/verify.c
- include/linux/fsverity.h 56 additions, 0 deletionsinclude/linux/fsverity.h
Loading