Skip to content

Add dmverity support to erofs snapshotter using veritysetup cli#13

Draft
aadhar-agarwal wants to merge 1 commit intomainfrom
aadagarwal/erofs-snapshotter-with-dmverity
Draft

Add dmverity support to erofs snapshotter using veritysetup cli#13
aadhar-agarwal wants to merge 1 commit intomainfrom
aadagarwal/erofs-snapshotter-with-dmverity

Conversation

@aadhar-agarwal
Copy link
Copy Markdown
Owner

@aadhar-agarwal aadhar-agarwal commented Oct 20, 2025

Add dm-verity support for EROFS layers in containerd

This PR introduces block-level data integrity verification for EROFS container layers using device-mapper verity (dm-verity):

  • Uses the veritysetup CLI tool to create Merkle hash trees and dm-verity devices for EROFS blobs.
  • Adds new configuration: enable_dmverity = true for both snapshotter and differ plugins.
  • EROFS layers are formatted with a dm-verity hash tree; metadata is stored in layer.erofs.dmverity alongside the blob.
  • At runtime, each layer is mounted via a dm-verity device (read-only) and verified.
  • Mount options for dm-verity are passed via the mount manager and applied per layer.
  • Extensive tests cover formatting, mounting, idempotency, error cases, and end-to-end workflow.
  • Non-Linux environments gracefully handle unsupported dm-verity operations.

Note: When enabled, it requires a Linux kernel with dm-verity support and the dm_verity module loaded, and the veritysetup binary from cryptsetup

@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/erofs-snapshotter-with-dmverity branch 4 times, most recently from 2151d0c to d580055 Compare October 24, 2025 22:55
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/add-dmverity-support branch from 247783b to 15fc5e6 Compare October 27, 2025 17:13
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/erofs-snapshotter-with-dmverity branch from d580055 to a5c1344 Compare October 27, 2025 17:17
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/add-dmverity-support branch 2 times, most recently from 59f6db8 to d7e0f55 Compare October 28, 2025 22:24
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/erofs-snapshotter-with-dmverity branch 3 times, most recently from 3a20f11 to 8d64994 Compare October 28, 2025 22:46
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/add-dmverity-support branch from d7e0f55 to 0c87f5a Compare October 30, 2025 21:27
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/erofs-snapshotter-with-dmverity branch from 8d64994 to 078d0e8 Compare October 31, 2025 21:21
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/add-dmverity-support branch from 0c87f5a to 0f2e702 Compare November 5, 2025 22:42
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/erofs-snapshotter-with-dmverity branch 2 times, most recently from b246563 to e8671fd Compare November 9, 2025 23:32
@aadhar-agarwal aadhar-agarwal changed the base branch from aadagarwal/add-dmverity-support to main November 9, 2025 23:33
@aadhar-agarwal aadhar-agarwal changed the title Add dmverity support to erofs snapshotter Add dmverity support to erofs snapshotter using veritysetup system tool Nov 9, 2025
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/erofs-snapshotter-with-dmverity branch 6 times, most recently from 7155724 to 3505e7d Compare November 11, 2025 01:41
@aadhar-agarwal aadhar-agarwal changed the title Add dmverity support to erofs snapshotter using veritysetup system tool Add dmverity support to erofs snapshotter using veritysetup cli Nov 11, 2025
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/erofs-snapshotter-with-dmverity branch 2 times, most recently from 9fd3c39 to 7de454c Compare November 11, 2025 02:03
Signed-off-by: Aadhar Agarwal <aadagarwal@microsoft.com>
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/erofs-snapshotter-with-dmverity branch from 7de454c to 3e3aff2 Compare November 12, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant