Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework merkle tree implementation to use io.Reader instead of byte array #1209

Merged
merged 4 commits into from
Nov 11, 2021

Conversation

anmaxvl
Copy link
Contributor

@anmaxvl anmaxvl commented Oct 27, 2021

MerkleTree implementation requires the entire content of ext4 file
system to be read into a byte array when computing cryptographic digest.

This PR reworks the existing implementation to work with io.Reader
interface instead.

Additionally update the existing usages of MerkleTree with the new
MerkleTreeWithReader implementation.

Signed-off-by: Maksim An [email protected]

@anmaxvl anmaxvl requested a review from a team as a code owner October 27, 2021 07:04
@anmaxvl anmaxvl force-pushed the merkle-tree-with-io-reader branch from b3a2950 to 44d0864 Compare October 27, 2021 07:06
@anmaxvl
Copy link
Contributor Author

anmaxvl commented Oct 27, 2021

FYI @SeanTAllen

@anmaxvl anmaxvl force-pushed the merkle-tree-with-io-reader branch from 44d0864 to 9cce66a Compare October 27, 2021 07:22
cmd/dmverity-vhd/main.go Outdated Show resolved Hide resolved
@dcantah dcantah self-assigned this Oct 27, 2021
@dcantah
Copy link
Contributor

dcantah commented Oct 27, 2021

Planning to look at this later today

ext4/tar2ext4/tar2ext4.go Outdated Show resolved Hide resolved
ext4/dmverity/dmverity.go Outdated Show resolved Hide resolved
ext4/dmverity/dmverity.go Outdated Show resolved Hide resolved
ext4/dmverity/dmverity.go Outdated Show resolved Hide resolved
ext4/tar2ext4/tar2ext4.go Outdated Show resolved Hide resolved
@anmaxvl anmaxvl force-pushed the merkle-tree-with-io-reader branch from 5f71418 to 4d2e604 Compare October 28, 2021 18:31
@anmaxvl
Copy link
Contributor Author

anmaxvl commented Nov 2, 2021

@dcantah up 😄, @microsoft/containerplat more eyes are welcome

@anmaxvl anmaxvl requested a review from a team November 2, 2021 23:27
@anmaxvl anmaxvl force-pushed the merkle-tree-with-io-reader branch 2 times, most recently from fe6df3b to 378b9d7 Compare November 5, 2021 00:05
ext4/dmverity/dmverity.go Outdated Show resolved Hide resolved
Copy link
Contributor

@msscotb msscotb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

MerkleTree implementation requires the entire content of ext4 file
system to be read into a byte array when computing cryptographic digest.

This PR reworks the existing implementation to work with io.Reader
interface instead.

Additionally update the existing usages of MerkleTree with the new
MerkleTreeWithReader implementation.

Signed-off-by: Maksim An <[email protected]>
Separate tar to ext4 logic of Convert into a ConvertTarToExt4
function.

Signed-off-by: Maksim An <[email protected]>
@anmaxvl anmaxvl force-pushed the merkle-tree-with-io-reader branch from 378b9d7 to a02bdf5 Compare November 10, 2021 01:37
Copy link
Contributor

@dcantah dcantah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@anmaxvl anmaxvl merged commit ddab09b into microsoft:master Nov 11, 2021
@anmaxvl anmaxvl deleted the merkle-tree-with-io-reader branch November 11, 2021 23:55
@SeanTAllen
Copy link
Contributor

awesome

princepereira pushed a commit to princepereira/hcsshim that referenced this pull request Aug 29, 2024
…ray (microsoft#1209)

MerkleTree implementation requires the entire content of ext4 file
system to be read into a byte array when computing cryptographic digest.

This PR reworks the existing implementation to work with io.Reader
interface instead.

Additionally update the existing usages of MerkleTree with the new
MerkleTreeWithReader implementation.

Separate tar to ext4 logic of Convert into a ConvertTarToExt4
function.

Signed-off-by: Maksim An <[email protected]>
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.

5 participants