Add support for FS_VERITY_METADATA_TYPE_SIGNATURE to FS_IOC_READ_VERITY_METADATA. This allows a userspace server program to retrieve the built-in signature (if present) of a verity file for serving to a client which implements fs-verity compatible verification. See the patch which introduced FS_IOC_READ_VERITY_METADATA for more details. The ability for userspace to read the built-in signatures is also useful because it allows a system that is using the in-kernel signature verification to migrate to userspace signature verification. This has been tested using a new xfstest which calls this ioctl via a new subcommand for the 'fsverity' program from fsverity-utils.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -85,6 +85,7 @@ struct fsverity_formatted_digest { · 84 unmodified lines | |||
| 85 | 85 | ||
| 86 | #define FS_VERITY_METADATA_TYPE_MERKLE_TREE 1 | 86 | #define FS_VERITY_METADATA_TYPE_MERKLE_TREE 1 |
| 87 | #define FS_VERITY_METADATA_TYPE_DESCRIPTOR 2 | 87 | #define FS_VERITY_METADATA_TYPE_DESCRIPTOR 2 |
| 88 | #define FS_VERITY_METADATA_TYPE_SIGNATURE 3 | ||
| 88 | 89 | ||
| 89 | struct fsverity_read_metadata_arg { | 90 | struct fsverity_read_metadata_arg { |
| 90 | __u64 metadata_type; | 91 | __u64 metadata_type; |