[dm-devel] alignment enforcement in dm-crypt causes severe problems

Andreas Kinzler hfp at posteo.de
Wed Apr 8 10:21:19 UTC 2020


Hello devs,

please see issue: 
https://github.com/virtio-win/kvm-guest-drivers-windows/issues/446

Short summary: When using encrypted disks with qemu (using dm-crypt) and 
pass that through LIO/vhost to qemu (via virtio-scsi) the following code 
is hit:

https://elixir.bootlin.com/linux/v5.3.18/source/drivers/md/dm-crypt.c#L1251

I am not familiar with the specification/contract of "bio". So I am not 
sure if the enforced alignment is legitimate.

Under Windows you cannot even initialize a disk because it wants to 
write sector 0 (count = 1) at offset 432.

Could some expert please comment?

Regards Andreas





More information about the dm-devel mailing list