summaryrefslogtreecommitdiffstats
path: root/fs/verity/fsverity_private.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2020-11-13 13:19:17 -0800
committerEric Biggers <ebiggers@google.com>2020-11-16 11:40:12 -0800
commited45e201649344412445d6f65f0473a6112f0bcd (patch)
tree1b02c6858128bca82ccab549a8fa4a71a3e5899e /fs/verity/fsverity_private.h
parent9e90f30e78572ecfc1c74c735a034c955d822ba6 (diff)
downloadlinux-ed45e201649344412445d6f65f0473a6112f0bcd.tar.gz
linux-ed45e201649344412445d6f65f0473a6112f0bcd.tar.bz2
linux-ed45e201649344412445d6f65f0473a6112f0bcd.zip
fs-verity: rename "file measurement" to "file digest"
I originally chose the name "file measurement" to refer to the fs-verity file digest to avoid confusion with traditional full-file digests or with the bare root hash of the Merkle tree. But the name "file measurement" hasn't caught on, and usually people are calling it something else, usually the "file digest". E.g. see "struct fsverity_digest" and "struct fsverity_formatted_digest", the libfsverity_compute_digest() and libfsverity_sign_digest() functions in libfsverity, and the "fsverity digest" command. Having multiple names for the same thing is always confusing. So to hopefully avoid confusion in the future, rename "fs-verity file measurement" to "fs-verity file digest". This leaves FS_IOC_MEASURE_VERITY as the only reference to "measure" in the kernel, which makes some amount of sense since the ioctl is actively "measuring" the file. I'll be renaming this in fsverity-utils too (though similarly the 'fsverity measure' command, which is a wrapper for FS_IOC_MEASURE_VERITY, will stay). Acked-by: Luca Boccassi <luca.boccassi@microsoft.com> Link: https://lore.kernel.org/r/20201113211918.71883-4-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'fs/verity/fsverity_private.h')
-rw-r--r--fs/verity/fsverity_private.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/verity/fsverity_private.h b/fs/verity/fsverity_private.h
index 75f8e18b44a5..21e9930d65fb 100644
--- a/fs/verity/fsverity_private.h
+++ b/fs/verity/fsverity_private.h
@@ -67,19 +67,19 @@ struct merkle_tree_params {
* When a verity file is first opened, an instance of this struct is allocated
* and stored in ->i_verity_info; it remains until the inode is evicted. It
* caches information about the Merkle tree that's needed to efficiently verify
- * data read from the file. It also caches the file measurement. The Merkle
- * tree pages themselves are not cached here, but the filesystem may cache them.
+ * data read from the file. It also caches the file digest. The Merkle tree
+ * pages themselves are not cached here, but the filesystem may cache them.
*/
struct fsverity_info {
struct merkle_tree_params tree_params;
u8 root_hash[FS_VERITY_MAX_DIGEST_SIZE];
- u8 measurement[FS_VERITY_MAX_DIGEST_SIZE];
+ u8 file_digest[FS_VERITY_MAX_DIGEST_SIZE];
const struct inode *inode;
};
/*
- * Merkle tree properties. The file measurement is the hash of this structure
- * excluding the signature and with the sig_size field set to 0.
+ * Merkle tree properties. The fs-verity file digest is the hash of this
+ * structure excluding the signature and with the sig_size field set to 0.
*/
struct fsverity_descriptor {
__u8 version; /* must be 1 */
@@ -101,7 +101,7 @@ struct fsverity_descriptor {
sizeof(struct fsverity_descriptor))
/*
- * Format in which verity file measurements are signed in built-in signatures.
+ * Format in which fs-verity file digests are signed in built-in signatures.
* This is the same as 'struct fsverity_digest', except here some magic bytes
* are prepended to provide some context about what is being signed in case the
* same key is used for non-fsverity purposes, and here the fields have fixed