[dm-crypt] out of order encryption

Vasile Catalin-B50542 catalin.vasile at freescale.com
Thu Aug 6 12:12:44 CEST 2015


I was referring to the submitted requests.
Does the underlying encryption layer (CryptoAPI) have to ensure the
complete callbacks are called in the order the requests were submitted?
Or does dm-crypt figure out where to read/write after request is done
no matter in which order the crypto requests finished?

On 06.08.2015 12:15, Milan Broz wrote:
> On 08/06/2015 09:00 AM, Vasile Catalin-B50542 wrote:
>> Would dm-crypt execute correctly if sector encryption ended asynchronously?
>> For example:
>> If sector 1, 2, 3 are sent to be done asynchronously to the same
>> algorithm instance,
>> and the jobs end in the following order: 2, 1, 3; does the dm-crypt
>> module know to
>> write the data in the proper place when the encryption "done" callback
>> is called?
> Not sure if I understand your question - encryption in dmcrypt works on sector
> level, sectors are encrypted independetly, so order cannot influence result
> of encryption of individual sectors.
>
> Or if the question is about order of submitted requests:
> If you need to ensure order of processing, you have to issue "flush" operation
> before submitting next data content. Filesystems typically must do this when
> handling journal or so.
>
> In general, requests order can be rearranged (anywhere in block layer, not only in dmcrypt).
> But this is correct behaviour.
>
> Milan

-- 

CatalinVasile

Intern, DN-Software

FreescaleSemiconductor, Inc.

www.freescale.com

phone: 073-021-1938

e-mail: catalin.vasile at freescale.com <mailto:your.name at freescale.com>

*Freescale_Logo-nosemi_Lh_4c***

This e-mail, and any associated attachments have been classified as:

[ ] Public

[ ] Freescale Semiconductor Internal Use Only

[ ] Freescale Semiconductor Confidential Proprietary

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20150806/1c03227f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1979 bytes
Desc: not available
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20150806/1c03227f/attachment-0001.gif>


More information about the dm-crypt mailing list