]> git.baikalelectronics.ru Git - kernel.git/commit
fs-verity: add the hook for file ->open()
authorEric Biggers <ebiggers@google.com>
Mon, 22 Jul 2019 16:26:22 +0000 (09:26 -0700)
committerEric Biggers <ebiggers@google.com>
Sun, 28 Jul 2019 23:59:16 +0000 (16:59 -0700)
commit01daf9422ba00ac9cff2a897522107c27c49d124
tree8a0296afe484924a2fcf59ebfaacf114948d206f
parentba9e710f028b6ae87c47c2bedc3bbe0f1da43ca8
fs-verity: add the hook for file ->open()

Add the fsverity_file_open() function, which prepares an fs-verity file
to be read from.  If not already done, it loads the fs-verity descriptor
from the filesystem and sets up an fsverity_info structure for the inode
which describes the Merkle tree and contains the file measurement.  It
also denies all attempts to open verity files for writing.

This commit also begins the include/linux/fsverity.h header, which
declares the interface between fs/verity/ and filesystems.

Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
fs/verity/Makefile
fs/verity/fsverity_private.h
fs/verity/init.c
fs/verity/open.c [new file with mode: 0644]
include/linux/fsverity.h [new file with mode: 0644]