Extend integrity protection of LCOW layers to SCSI devices#1170
Extend integrity protection of LCOW layers to SCSI devices#1170anmaxvl merged 4 commits intomicrosoft:masterfrom
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 <maksiman@microsoft.com>
Signed-off-by: Maksim An <maksiman@microsoft.com>
354aa1b to
be898fa
Compare
Signed-off-by: Maksim An <maksiman@microsoft.com>
be898fa to
49e4ed6
Compare
| createZeroSectorLinearTarget = dm.CreateZeroSectorLinearTarget | ||
| createVerityTarget = dm.CreateVerityTarget | ||
| removeDevice = dm.RemoveDevice |
There was a problem hiding this comment.
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.
yes, I added some tests to make sure that the device mapper targets are cleaned up on failure.
|
@dcantah please revisit 😄 |
Signed-off-by: Maksim An <maksiman@microsoft.com>
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 <maksiman@microsoft.com>
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 maksiman@microsoft.com