diff options
author | Eric Biggers <ebiggers@google.com> | 2019-07-22 19:26:22 +0300 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2019-07-29 02:59:16 +0300 |
commit | 8a1d0f9cacc997bedc017056a94f35dc823394ed (patch) | |
tree | 90d55ad08622ed954361629d906d11469919abae /fs/verity/open.c | |
parent | c1d9b584e2cf3f0562d8fcf34574c044d17853a1 (diff) | |
download | linux-8a1d0f9cacc997bedc017056a94f35dc823394ed.tar.xz |
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>
Diffstat (limited to 'fs/verity/open.c')
-rw-r--r-- | fs/verity/open.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/verity/open.c b/fs/verity/open.c index 2cb2fe8082bf..3636a1ed8e2c 100644 --- a/fs/verity/open.c +++ b/fs/verity/open.c @@ -337,3 +337,9 @@ int __init fsverity_init_info_cache(void) return -ENOMEM; return 0; } + +void __init fsverity_exit_info_cache(void) +{ + kmem_cache_destroy(fsverity_info_cachep); + fsverity_info_cachep = NULL; +} |