From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZKWUB-00062j-Hn for mharc-grub-devel@gnu.org; Wed, 29 Jul 2015 14:53:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKWU4-00062X-Fk for grub-devel@gnu.org; Wed, 29 Jul 2015 14:53:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKWTz-0006ul-E2 for grub-devel@gnu.org; Wed, 29 Jul 2015 14:53:44 -0400 Received: from johnlane.plus.com ([212.159.104.145]:64669 helo=sodium.amajohn.co.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKWTz-0006sG-7Q for grub-devel@gnu.org; Wed, 29 Jul 2015 14:53:39 -0400 Received: by sodium.amajohn.co.uk (Postfix, from userid 1000) id C6E3756; Wed, 29 Jul 2015 19:53:29 +0100 (BST) Received: from [10.0.200.1] (hydrogen.amajohn.co.uk [10.0.200.1]) by sodium.amajohn.co.uk (Postfix) with ESMTPSA id 0268A48; Wed, 29 Jul 2015 19:53:27 +0100 (BST) Message-ID: <55B92125.5010401@jelmail.com> Date: Wed, 29 Jul 2015 19:53:25 +0100 From: John Lane User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Andrei Borzenkov Subject: Re: [PATCH 5/5] Cryptomount support for hyphens in UUID References: <1435588260-29456-1-git-send-email-grub@jelmail.com> <1435588260-29456-6-git-send-email-grub@jelmail.com> <20150729060823.136d182a@opensuse.site> <55B87800.3060802@jelmail.com> <20150729195112.751a7ec9@opensuse.site> In-Reply-To: <20150729195112.751a7ec9@opensuse.site> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Outbound-Checked: Yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 212.159.104.145 Cc: grub-devel@gnu.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jul 2015 18:53:50 -0000 On 29/07/15 17:51, Andrei Borzenkov wrote: > > That not what I mean. This patch ignores hyphens in UUID for any > current and future crypto backends. This means that it cannot > distinguish between 11-122 and 111-22 as UUID. And we cannot be sure we= > never meet such backend.=20 do you really think that's likely? > And GELI as far as I can tell does not > actually use hyphens. > > We already made mistake of mangling native UUID, I'd rather avoid > continue to do it. > > Can we restrict this to LUKS only?=20 One of the three places that UUIDs are compared is in the LUKS module. The other two are in the generic cryptodisk module, one when the "-u" argument is given (which I believe is LUKS-specific although not in the LUKS module) and the other when a crypto disk is referenced as a (cryptouuid/...) which is generic code, not LUKS-specific. Making it LUKS-specific would mean deleting the third case, which is actually the most useful IMHO. Unless we could identify a LUKS disk from within a grub_cryptodisk_t but I don't think that's possible ? If it were, we could make the "uuidcmp" function accept an "ignore-hyphens" parameter that is true for LUKS and false for everything else. But it all seems to be getting overcomplicated for what was meant to be a simple tweak.