diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 15:51:20 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 15:51:20 -1000 |
| commit | 9e73b189c88fcba63af4775d637d395de0af4fdb (patch) | |
| tree | 87f10ef6121bf6b587fe1d8128a97ae9415d0100 /include/linux | |
| parent | fe178c26cae01b677a1fec59f9c276c7bf20517a (diff) | |
| parent | f9e450420da2624c93ce9585deebfabb87932774 (diff) | |
Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux
Pull fsverity updates from Eric Biggers:
"Patches from Andrey Albershteyn to prepare for XFS fsverity support:
- Report verification errors through fserror, instead of only through
an unstructured log message and generic I/O error return
- Move the reporting of STATX_ATTR_VERITY into the VFS, so that each
fsverity-capable filesystem doesn't need to do it. This also fixes
a bug where btrfs didn't return STATX_ATTR_VERITY in
attributes_mask
- Make the VFS prevent enabling DAX on fsverity files, so that it
will be handled in a single place for ext4 and XFS
- Move ext4 and f2fs's code to read verity metadata from the
pagecache into shared code, so that XFS will be able to use it too
- Export fsverity_ensure_verity_info() for XFS scrub to use
- Pass all-zeroes hash to ->write_merkle_tree_block() so that XFS
will be able to implement an optimization for sparse files"
* tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux:
fsverity: hoist statx reporting of fs-verity flag
fsverity: don't allow setting DAX file attribute on fsverity files
fsverity: hoist pagecache_read from f2fs/ext4 to fsverity
fsverity: pass digest size and hash of the all-zeroes block to ->write
fsverity: expose ensure_fsverity_info()
fsverity: report validation errors through fserror to fsnotify
MAINTAINERS: List the fsverity branches
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fsverity.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/fsverity.h b/include/linux/fsverity.h index 6c467ded9751..f9433332c274 100644 --- a/include/linux/fsverity.h +++ b/include/linux/fsverity.h @@ -124,6 +124,8 @@ struct fsverity_operations { * @buf: the Merkle tree block to write * @pos: the position of the block in the Merkle tree (in bytes) * @size: the Merkle tree block size (in bytes) + * @zero_digest: the hash of the all-zeroes block + * @digest_size: size of zero_digest, in bytes * * This is only called between ->begin_enable_verity() and * ->end_enable_verity(). @@ -131,7 +133,9 @@ struct fsverity_operations { * Return: 0 on success, -errno on failure */ int (*write_merkle_tree_block)(struct file *file, const void *buf, - u64 pos, unsigned int size); + u64 pos, unsigned int size, + const u8 *zero_digest, + unsigned int digest_size); }; #ifdef CONFIG_FS_VERITY @@ -317,10 +321,14 @@ static inline int fsverity_file_open(struct inode *inode, struct file *filp) return 0; } +int fsverity_ensure_verity_info(struct inode *inode); + void fsverity_cleanup_inode(struct inode *inode); struct page *generic_read_merkle_tree_page(struct inode *inode, pgoff_t index); void generic_readahead_merkle_tree(struct inode *inode, pgoff_t index, unsigned long nr_pages); +int fsverity_pagecache_read(struct inode *inode, void *buf, size_t count, + loff_t pos); #endif /* _LINUX_FSVERITY_H */ |
