Module fsverity

Module fsverity 

Source
Expand description

Linux fs-verity support for integrity verification.

This module provides complete fs-verity functionality including userspace digest computation, kernel ioctl interfaces for enabling and measuring verity, and hash value types for SHA-256 and SHA-512.

Modulesยง

digest ๐Ÿ”’
Userspace fs-verity digest computation.
hashvalue ๐Ÿ”’
Hash value types and trait definitions for fs-verity.
ioctl ๐Ÿ”’
Low-level ioctl interfaces for fs-verity kernel operations.

Structsยง

FsVerityHasher
Incremental fs-verity digest computation.
Sha256HashValue
A SHA-256 hash value for fs-verity operations.
Sha512HashValue
A SHA-512 hash value for fs-verity operations.

Enumsยง

CompareVerityError
A verity comparison failed.
EnableVerityError
Enabling fsverity failed.
MeasureVerityError
Measuring fsverity failed.

Traitsยง

FsVerityHashValue
Trait for fs-verity hash value types supporting SHA-256 and SHA-512.

Functionsยง

compute_verity
Compute the fs-verity digest for a given block of data, in userspace.
enable_verity_maybe_copy
Enable fs-verity on the given file. If the given file cannot be enabled because it is opened as writable, then a new copy of the file will be returned instead. No attempt is made to sync the copied file contents to disk, it is up to the caller to do so if desired.
enable_verity_on_copy ๐Ÿ”’
Enable fs-verity on a new copy of fd, consuming fd and returning the new copy. The copy is created via O_TMPFILE relative to dirfd.
enable_verity_raw
Enable fs-verity on the given file.
enable_verity_with_retry
Enable fs-verity on the given file, retrying if file is opened for writing.
ensure_verity_equal
Compare the fs-verity digest of the file versus the expected digest.
measure_verity
Measures fs-verity on the given file.
measure_verity_opt
Measures fs-verity on the given file.