From: Theodore Tso <tytso@mit.edu>
To: Karsten Hopp <karsten@redhat.com>
Cc: linux-ext4@vger.kernel.org, dm-crypt@saout.de
Subject: Re: Patch to support LUKS UUIDs in libblkid
Date: Thu, 21 Jun 2007 13:56:18 -0400 [thread overview]
Message-ID: <20070621175618.GA22285@thunk.org> (raw)
In-Reply-To: <466FCE52.4000605@redhat.com>
Thanks, I've applied the blkid LUKS patch to the e2fsprogs SCM (modulo
a minor whitespace breakage which I fixed up).
BTW, there appears to be a problem here in udev regarding LUKS
identification:
https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/93921
The problem is that udev sets its magic string in the first 512 bytes
of the partition. This is dangerous and error-prone, because other
things like boot sectors and BSD disk labels tend to live in the first
512 byte sector. Hence, many programs are very careful before zapping
the first 512 byte sector. LUKS was added to the vol_id program very
high in the list of filesystems to be probed, ahead of ext2/ext3, so a
filesystem previously contained a LUKS setup, but then was later
mke2fs'ed to be used as a normal ext2/3 filesyste, may get
misidentified by udev's vol_id as still being a LUKS filesystem if
other fields in the first 512 byte sector cause mke2fs to mistakenly
think there was a BSD disklabel in the sector and thus refuse to zero
it out.
This won't be a problem with blkid, since LUKS is placed *after*
ext3/4. However, it would be a good idea to check and make sure that
whever is setting up a LUKS partition clears the first and last 32k of
a filesystem, to avoid potential confusion by other in-band filesystem
type checkers. It would probably be a good idea to (after you make
sure this is done) to submit a patch to the uev folks changing the
probing order of vol_id so that it probes for the LUK filesystem after
ext2/3.
I am currently consider adding specific kludges to mke2fs that checks
the first couple of bytes of the 512 byte sector for the problematic
filesystem types (NTFS and LUKS), explicitly clearing just those bytes
to avoid future confusion. But that won't help the existing
filesystems that are out there....
- Ted
next prev parent reply other threads:[~2007-06-21 17:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-05 11:23 Patch to support LUKS UUIDs in libblkid Karsten Hopp
2007-06-05 14:20 ` Eric Sandeen
2007-06-05 23:17 ` Andreas Dilger
2007-06-08 15:36 ` Theodore Tso
2007-06-11 11:51 ` Karsten Hopp
2007-06-12 23:40 ` Theodore Tso
2007-06-13 11:00 ` Karsten Hopp
2007-06-21 17:56 ` Theodore Tso [this message]
2007-07-03 9:19 ` Karsten Hopp
2007-07-03 15:57 ` Eric Sandeen
[not found] ` <46964694.7000707@redhat.com>
2007-07-23 15:00 ` Karsten Hopp
2007-07-23 16:19 ` Theodore Tso
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=20070621175618.GA22285@thunk.org \
--to=tytso@mit.edu \
--cc=dm-crypt@saout.de \
--cc=karsten@redhat.com \
--cc=linux-ext4@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;
as well as URLs for NNTP newsgroup(s).