Skip to content

Add option to write Merkle tree to a file

Eric Biggers linux-fscrypt 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4lib/compute_digest: add callbacks for getting the verity metadatainclude/libfsverity.h lib/compute_digest.c+156 -200 replies
2/4programs/test_compute_digest: test the metadata callbacksprograms/test_compute_digest.c+133 -00 replies
3/4programs/utils: add full_pwrite() and preallocate_file()programs/utils.c programs/utils.h+62 -04 replies
4/4programs/fsverity: add --out-merkle-tree and --out-descriptor optionsprograms/cmd_digest.c programs/cmd_sign.c programs/fsverity.c +1 more+107 -90 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchVictor Hsieh
SeriesR-b
1/4
2/4
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [fsverity-utils PATCH 0/4] Add option to write Merkle tree to a file

Make 'fsverity digest' and 'fsverity sign' support writing the Merkle tree and fs-verity descriptor to files, using new options '--out-merkle-tree=FILE' and '--out-descriptor=FILE'.

Normally these new options aren't useful, but they can be needed in cases where the fs-verity metadata needs to be consumed by something other than one of the native Linux kernel implementations of fs-verity.

This is different from 'fsverity dump_metadata' in that 'fsverity dump_metadata' only works on a file with fs-verity enabled, whereas these new options are for the userspace file digest computation.

Supporting this required adding some optional callbacks to libfsverity_compute_digest().

Eric Biggers (4):
lib/compute_digest: add callbacks for getting the verity metadata programs/test_compute_digest: test the metadata callbacks programs/utils: add full_pwrite() and preallocate_file() programs/fsverity: add --out-merkle-tree and --out-descriptor options

 include/libfsverity.h          |  46 +++++++++++-
 lib/compute_digest.c           | 130 +++++++++++++++++++++++++++-----
 programs/cmd_digest.c          |   7 +-
 programs/cmd_sign.c            |  17 +++--
 programs/fsverity.c            |  88 +++++++++++++++++++++-
 programs/fsverity.h            |   4 +-
 programs/test_compute_digest.c | 133 +++++++++++++++++++++++++++++++++
 programs/utils.c               |  59 +++++++++++++++
 programs/utils.h               |   3 +
 9 files changed, 458 insertions(+), 29 deletions(-)

base-commit: cf8fa5e5a7ac5b3b2dbfcc87e5dbd5f984c2d83a

Signature · 1 line
2.31.1