From: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com>
To: Milan Broz <gmazyland@gmail.com>,
Eric Biggers <ebiggers@kernel.org>,
Mike Snitzer <snitzer@redhat.com>
Cc: Damien.LeMoal@wdc.com, ssudhakarp@gmail.com,
Martin Petersen <martin.petersen@oracle.com>,
dm-crypt@saout.de, dm-devel@redhat.com,
Shirley Ma <shirley.ma@oracle.com>,
mpatocka@redhat.com, agk@redhat.com
Subject: Re: [dm-crypt] [dm-devel] [RFC PATCH 0/2] dm crypt: Allow unaligned buffer lengths for skcipher devices
Date: Thu, 24 Sep 2020 09:55:01 -0700 (PDT) [thread overview]
Message-ID: <378f445c-2136-4d17-ac2f-355b7850d28a@default> (raw)
In-Reply-To: <1c44946e-9661-16f7-1c38-32d666b55fb2@gmail.com>
Hello Milan,
> -----Original Message-----
> From: Milan Broz [mailto:gmazyland@gmail.com]
> Sent: Thursday, September 24, 2020 2:16 AM
> To: Eric Biggers <ebiggers@kernel.org>; Mike Snitzer <snitzer@redhat.com>
> Cc: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com>;
> Damien.LeMoal@wdc.com; ssudhakarp@gmail.com; Martin Petersen
> <martin.petersen@oracle.com>; dm-crypt@saout.de; dm-devel@redhat.com;
> Shirley Ma <shirley.ma@oracle.com>; mpatocka@redhat.com;
> agk@redhat.com
> Subject: Re: [dm-devel] [RFC PATCH 0/2] dm crypt: Allow unaligned buffer
> lengths for skcipher devices
>
> 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?
I don't follow your question regarding fs journals. I am not sure why it is not safe to process unaligned bio segment lengths of fs journals writes. Could you explain with some example on why that would be a problem?
Please see my reply to Eric's/Mike's email, in that, I explained why this issue needs to be fixed in dm-crypt. I hope I have answered to your questions there. If not, let me know, I will try to answer.
Thanks
Sudhakar
>
> Milan
next prev parent reply other threads:[~2020-09-24 16:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1600281606-1446-1-git-send-email-sudhakar.panneerselvam@oracle.com>
2020-09-23 17:01 ` [dm-crypt] [dm-devel] [RFC PATCH 0/2] dm crypt: Allow unaligned buffer lengths for skcipher devices Sudhakar Panneerselvam
2020-09-24 1:27 ` [dm-crypt] " Mike Snitzer
2020-09-24 5:14 ` [dm-crypt] [dm-devel] " Eric Biggers
2020-09-24 8:15 ` Milan Broz
2020-09-24 16:55 ` Sudhakar Panneerselvam [this message]
2020-09-24 16:44 ` Sudhakar Panneerselvam
2020-09-24 17:26 ` Mikulas Patocka
2020-09-24 17:38 ` Sudhakar Panneerselvam
2020-09-24 17:50 ` Mikulas Patocka
2020-09-24 18:11 ` Sudhakar Panneerselvam
2020-09-24 18:44 ` Mikulas Patocka
2020-09-24 19:13 ` Sudhakar Panneerselvam
2020-09-25 1:09 ` Damien Le Moal
2020-09-25 20:15 ` [dm-crypt] " Mike Snitzer
2020-09-24 12:47 ` Mikulas Patocka
2020-09-24 15:58 ` Sudhakar Panneerselvam
2020-09-24 12:40 ` [dm-crypt] [dm-devel] " Mikulas Patocka
2020-09-24 17:12 ` Sudhakar Panneerselvam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=378f445c-2136-4d17-ac2f-355b7850d28a@default \
--to=sudhakar.panneerselvam@oracle.com \
--cc=Damien.LeMoal@wdc.com \
--cc=agk@redhat.com \
--cc=dm-crypt@saout.de \
--cc=dm-devel@redhat.com \
--cc=ebiggers@kernel.org \
--cc=gmazyland@gmail.com \
--cc=martin.petersen@oracle.com \
--cc=mpatocka@redhat.com \
--cc=shirley.ma@oracle.com \
--cc=snitzer@redhat.com \
--cc=ssudhakarp@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).