From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bYrOx-0008A5-UM for mharc-grub-devel@gnu.org; Sun, 14 Aug 2016 05:08:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYrOv-000899-LH for grub-devel@gnu.org; Sun, 14 Aug 2016 05:08:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bYrOr-0000yx-Bc for grub-devel@gnu.org; Sun, 14 Aug 2016 05:08:12 -0400 Received: from mout.gmx.net ([212.227.17.20]:58546) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYrOr-0000yW-1A for grub-devel@gnu.org; Sun, 14 Aug 2016 05:08:09 -0400 Received: from scdbackup.webframe.org ([91.8.173.247]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0Mchyv-1bqntJ0TBZ-00Hvk1 for ; Sun, 14 Aug 2016 11:08:08 +0200 Date: Sun, 14 Aug 2016 11:09:43 +0200 From: "Thomas Schmitt" To: grub-devel@gnu.org Subject: Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit References: In-Reply-To: Message-Id: <21921588586603194286@scdbackup.webframe.org> X-Provags-ID: V03:K0:InXVbtg1TodkJ7H+q+sr/YqbWLJSCP6S81AvlURuShxvpK7EXgW d+5Y/45TiLwjX3qmriwHdp0Cq7vuH9qHLRhKcv9GiCKooMsCFZ2CRVGn1asb+RtVrjQbPji j9grtf5DfgWAZnO9IgDFFJuwqZuiMVOp5c6LfgYQJVFbABh/y7y9zdJYJW10iXHL+tdedH9 T3xyeDgT/ymQLo4sfFaXA== X-UI-Out-Filterresults: notjunk:1;V01:K0:tJ1f7Bp9UC4=:NFwK+kw9TdiQ+7A1B+RCsy gQ8p99mX8qZ7tQzD12b/RhqFXZC1RX5zaZUXzW8UGsZf9tMsKf40AVotSrSs76EurELbK77Bg AV3TMCZ8wIBbEf0zXN0G7e3C4B6WTkwyrsT+jZUkEx61csqQjKMulK/OUWujPRd6J5kBgxbng v0fluRfSEEypKtN1hoRuXq3Q5gX5kDVpiknFxzYum0xtR2Va6MgMvGWODYTesWzbCg7QrBuc/ jGVH3RcyjzIgySwd2dD99DmtGKDepSdHbj6tzNoaZE6IupQJxVaCGet0sc0GBXPGeYHWlMjWv FLjPsJGpDBcwIyHLTryPJj7O2hknFvcky+CAkcibB3X1sqLAxSGNCHG6L1zwDErofcdFCxioh C/LlqTQhjo400JoOUhkr651RJ3ykd3yZefGKEG3891ByhROYM8MOxTqMgfg1KchmHNwdHN75g BrGWN4rYUpqvv0uqCGvFio5xhpJO6IYundd/WpRg0kq9aOgMoHK2EqQImjhzAn1bvKLEUXp8F salP8Q8259dH/3XBiM5L+R7DEivQQTpYhQjmh335FPTWvm7BYZbJO0ZJtXGOCLp+vusBVePKZ ToX6rjcOv32RLIs0aJBepZ1pV17o6rwQQCS7+yy3rVV6fiOVBlm7oETlenYpcuMKalAIDHkFx hePzWe/ghyFnYVGIJJ312LBFi+T8okJcctbFL0PwME+fL1TFpD+oiFtietsSOaQLQZTjIn5bc wo5r2Mdl+3Qd6fM3CnDo9vTXvx26y0HYp3o/e1cT2DXNT5wK04JSK3wNEWPmFE4uZNGK9vvmT ye+pqkz X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.20 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Aug 2016 09:08:14 -0000 Hi, after having freshly re-read the specs of UEFI and RFC4122, here is some nitpicking: Steve Kenton wrote: > > 3F2504E0-4F89-41D3-9A0C-0305E82C3301 Andrei Borzenkov wrote: > Usually GUIDs are displayed in lower case RFC4122 prescribes to read them independently of case, but to produce them with lowercase letters. > GPT GUID are pretty well defined by UEFI spec which in turn is > based on RFC 4122. UEFI 2.4 Appendix A claims to be in sync with RFC 4122. But that's obviously not true. They seem to have evolved in parallel. UEFI only documents the GUID variant with MAC address and finely granulated timestamp, which imposes a privacy problem. Other sources blame Microsoft for it. RFC 4122 describes that variant with different endianness, a pseudo-random variant (which about everybody is using), and a variant with crypto-grade hash of user input. The abstract of RFC 4122 names Distributed Computing Environment by Open Software Foundation as ancestor of its definition. While trying to grok the conversion from text format to binary format i could not reliably determine where to put the version nibble. RFC 4122 prescribes big-endian representation of 16 bit "time_hi_and_version", whereas UEFI prescribes little-endian "TimeHighAndVersion". uuidgen(1) obviously follows RFC 4122. xorriso currently generates them UEFI style but in next release will cowardly waste 4 bits of entropy by writing the nibble into both bytes. It seems that nobody interprets the entrails of GUIDs but rather everybody uses them as opaque byte strings. Nevertheless one has to expect byte swapping to happen when converting forth and back between text representation and binary representation by using different conversion software. Have a nice day :) Thomas