Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Mikulas Patocka <mpatocka@redhat.com>
To: linux-crypto@vger.kernel.org
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: Desynchronizing dm-raid1
Date: Mon, 5 May 2008 17:45:10 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0805051737580.25016@engineering.redhat.com> (raw)
In-Reply-To: <yq14padoast.fsf@sermon.lab.mkp.net>



On Mon, 7 Apr 2008, Martin K. Petersen wrote:

>>>>>> "Malahal" == malahal  <malahal@us.ibm.com> writes:
>
> [I sent this last week but it never made it to the list]
>
> Malahal> Very few drivers require it, so how about an interface to
> Malahal> lock the pages of an I/O available to drivers. Only needed
> Malahal> RAID drivers would lock the I/O while it is in progress and
> Malahal> they only pay the performance penalty.  mmap pages are a bit
> Malahal> tricky. They need to go into read-only mode when an I/O is in
> Malahal> progress. I know this would likely be rejected too!!!
>
> I have exactly the same problem with the data integrity stuff I'm
> working on.
>
> Essentially a checksum gets generated when a bio is submitted, and
> both the I/O controller and the disk drive verify the checksum.
>
> With ext2 in particular I often experience that the page (usually
> containing directory metadata) has been modified before the controller
> does the DMA.  And the I/O will then be rejected by the controller or
> drive because the checksum doesn't match the data.
>
> So this problem is not specific to DM/MD...
>
> -- 
> Martin K. Petersen	Oracle Linux Engineering

BTW: is it guaranteed for crypto functions that they read the source data 
only once?

I.e. if you encrypt a block while another CPU modifies it, and then 
decrypt it, is it guaranteed that each byte of the result will be either 
old byte or new byte of the original data?

If not, we have a subtle case of disk corruption here too. (imagine that 
you update for example atime field in inode while the block is being 
written and the crypto interface will trash the inode block).

Mikulas

       reply	other threads:[~2008-05-05 21:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <47DEC402.10309@redhat.com>
     [not found] ` <Pine.LNX.4.64.0803171611430.31803@porkchop.devel.redhat.com>
     [not found]   ` <20080317215631.GG29322@agk.fab.redhat.com>
     [not found]     ` <Pine.LNX.4.64.0803181921380.10939@porkchop.devel.redhat.com>
     [not found]       ` <20080318233955.GA12007@agk.fab.redhat.com>
     [not found]         ` <Pine.LNX.4.64.0803181942140.20490@porkchop.devel.redhat.com>
     [not found]           ` <20080319000241.GB12007@agk.fab.redhat.com>
     [not found]             ` <Pine.LNX.4.64.0803182015001.21077@porkchop.devel.redhat.com>
     [not found]               ` <20080319011757.GD12007@agk.fab.redhat.com>
     [not found]                 ` <Pine.LNX.4.64.0804021444120.22485@porkchop.devel.redhat.com>
     [not found]                   ` <20080403014042.GA3789@us.ibm.com>
     [not found]                     ` <yq14padoast.fsf@sermon.lab.mkp.net>
2008-05-05 21:45                       ` Mikulas Patocka [this message]
2008-05-06 10:29                         ` [dm-devel] Desynchronizing dm-raid1 Herbert Xu
2008-05-06 22:50                           ` Mikulas Patocka
2008-05-13  3:28                             ` Mikulas Patocka
2008-05-13  3:38                               ` [dm-devel] " Herbert Xu
2008-05-13 20:35                                 ` Mikulas Patocka
2008-05-14  1:14                                   ` [dm-devel] " Herbert Xu
2008-05-22  2:18                                     ` Mikulas Patocka
2008-05-22  2:42                                       ` [dm-devel] " Herbert Xu
2008-05-22 12:32                                         ` Mikulas Patocka
2008-05-22 23:53                                           ` [dm-devel] " Herbert Xu
2008-05-23 14:59                                             ` Mikulas Patocka
2008-05-24  0:01                                               ` Herbert Xu
2008-05-24 14:01                                                 ` Mikulas Patocka

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=Pine.LNX.4.64.0805051737580.25016@engineering.redhat.com \
    --to=mpatocka@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-crypto@vger.kernel.org \
    /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