On 24/09/2020 07:14, Eric Biggers wrote: > On Wed, Sep 23, 2020 at 09:27:32PM -0400, Mike Snitzer wrote: >> You've clearly done a nice job with these changes. Looks clean. >> >> BUT, I'm struggling to just accept that dm-crypt needs to go to these >> extra lengths purely because of one bad apple usecase. >> >> These alignment constraints aren't new. Are there other portions of >> Linux's crypto subsystem that needed comparable fixes in order to work >> with Microsfot OS initiated IO through a guest? >> >> You forecast that these same kinds of changes are needed for AEAD and >> dm-integrity... that's alarming. >> >> Are we _certain_ there is no other way forward? >> (Sorry I don't have suggestions.. I'm in "fact finding mode" ;) >> > > I don't understand why this is needed, since dm-crypt already sets its > logical_block_size to its crypto sector_size. Isn't it expected that I/O that > isn't aligned to logical_block_size fails? It's the I/O submitter's > responsibility to ensure logical_block_size alignment of all I/O segments. > Exactly how is the misaligned I/O actually being submitted here? Thanks for mentioning it - exactly that I asked when reading this patch... It seems that we are here fixing a problem that is just caused when someone ignores clearly set restrictions. Who is submitting these bioses? Why can it not be fixed there? What happens with writes to fs journals, etc., is it still safe if we are processing such unaligned bios? Milan -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel