-
Notifications
You must be signed in to change notification settings - Fork 255
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
Extend integrity protection of LCOW layers to SCSI devices #1170
Conversation
@SeanTAllen as well |
9add2cc
to
671b03e
Compare
@anmaxvl I think what I am going to bring up can be done in another PR. It would be very easy at the code level to accidentally turn off dm-verity setup. Take for example, my not turning it on (inadvertently) in the previous SCSI PR that led to this being its own PR. I think our best "simple" approach at the unit test level would be to have an interface for device mapper actions that setup verity and have a test that fails if we don't get a "signal" of some sort from our test stand-in for device mapping. It's far from perfect but would give some level of check at unit test time that code wasn't inadvertently removed. Whatever we do for an approach, we should do for pmem as well. |
e0166f2
to
bb1be10
Compare
bb1be10
to
354aa1b
Compare
LCOW layers can be added both as VPMem and as SCSI devices. Previous work focused on enabling integrity protection for read only VPMem layers, this change enables it for read-only SCSI devices as well. Just like in a VPMem scenario, create dm-verity target when verity information is presented to the guest during SCSI device mounting step. Additionally remove unnecessary unit test, since the guest logic has changed. Signed-off-by: Maksim An <[email protected]>
Signed-off-by: Maksim An <[email protected]>
354aa1b
to
be898fa
Compare
Signed-off-by: Maksim An <[email protected]>
be898fa
to
49e4ed6
Compare
createZeroSectorLinearTarget = dm.CreateZeroSectorLinearTarget | ||
createVerityTarget = dm.CreateVerityTarget | ||
removeDevice = dm.RemoveDevice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, what's the reasoning behind doing this? i found it somewhat confusing and harder to follow what was going on because of this. What is gained by doing this? Testability?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I added some tests to make sure that the device mapper targets are cleaned up on failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@dcantah please revisit 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this lgtm
Signed-off-by: Maksim An <[email protected]>
5fdf004
to
adfcb48
Compare
Related work items: microsoft#1067, microsoft#1097, microsoft#1119, microsoft#1170, microsoft#1176, microsoft#1180, microsoft#1181, microsoft#1182, microsoft#1183, microsoft#1184, microsoft#1185, microsoft#1186, microsoft#1187, microsoft#1188, microsoft#1189, microsoft#1191, microsoft#1193, microsoft#1194, microsoft#1195, microsoft#1196, microsoft#1197, microsoft#1200, microsoft#1201, microsoft#1202, microsoft#1203, microsoft#1204, microsoft#1205, microsoft#1206, microsoft#1207, microsoft#1209, microsoft#1210, microsoft#1211, microsoft#1218, microsoft#1219, microsoft#1220, microsoft#1223
…#1170) * extend integrity protection of LCOW layers to SCSI devices LCOW layers can be added both as VPMem and as SCSI devices. Previous work focused on enabling integrity protection for read only VPMem layers, this change enables it for read-only SCSI devices as well. Just like in a VPMem scenario, create dm-verity target when verity information is presented to the guest during SCSI device mounting step. Additionally remove unnecessary unit test, since the guest logic has changed. Add pmem and scsi unit tests for linear/verity device mapper targets Signed-off-by: Maksim An <[email protected]>
LCOW layers can be added both as VPMem and as SCSI devices.
Previous work focused on enabling integrity protection for read
only VPMem layers, this change enables it for read-only SCSI
devices as well.
Just like in a VPMem scenario, create dm-verity target when
verity information is presented to the guest during SCSI device
mounting step.
Additionally remove unnecessary unit test, since the guest logic
has changed.
Signed-off-by: Maksim An [email protected]