DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: Natanael Copa <ncopa@alpinelinux.org>
Cc: dm-crypt@saout.de
Subject: Re: [dm-crypt] luks header on initramfs img fails due to no O_DIRECT support in tmpfs
Date: Fri, 08 Aug 2014 15:38:49 +0200	[thread overview]
Message-ID: <53E4D2E9.9050005@gmail.com> (raw)
In-Reply-To: <20140808092257.04ccaca7@ncopa-desktop.alpinelinux.org>

On 08/08/2014 09:22 AM, Natanael Copa wrote:
> Hi,
> 
> I found this posting while looking at an issue with cryptsetup-1.6.5 in initramfs:
> http://www.saout.de/pipermail/dm-crypt/2014-August/004227.html
> 
> I believe this is same thing as reported here:
> http://bugs.alpinelinux.org/issues/3281
> 
> Seems like the problem is that open(2) does not support O_DIRECT when on tmpfs.
> 
> I don't subscribe to your mailing list but wanted to share anyways.

BTW I see patch removing O_DIRECT completely in your distro.

As you already mentioned in comment in link above, please do not do this.
You are risking data corruption in some situations.
Using direct-io should ensure that block device is really updated
(And also we really do not want to cache keyslot content in memory.)

I know it is not 100% solution but the best way is to report the problem
here and then backport upstream fix.

(Just use existing device_open() which tries to open device twice, also no need
to patch old code which do not fail. See upstream commit, I also added
test for tmpfs to not repeat the problem again in future.)

Thanks,
Milan

      parent reply	other threads:[~2014-08-08 13:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08  7:22 [dm-crypt] luks header on initramfs img fails due to no O_DIRECT support in tmpfs Natanael Copa
2014-08-08 11:20 ` Milan Broz
2014-08-08 13:38 ` Milan Broz [this message]

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=53E4D2E9.9050005@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=dm-crypt@saout.de \
    --cc=ncopa@alpinelinux.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