grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: "Thomas Schmitt" <scdbackup@gmx.net>
To: grub-devel@gnu.org
Subject: Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time
Date: Sun, 14 Aug 2016 11:09:43 +0200	[thread overview]
Message-ID: <21921588586603194286@scdbackup.webframe.org> (raw)
In-Reply-To: <d129b1b3-599f-44d6-42de-00ef93974e4a@gmail.com>

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



  reply	other threads:[~2016-08-14  9:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12 14:11 Grub module to return partuuid of a device such as (hd0, gpt1) at boot time Steve Kenton
2016-08-13 17:30 ` adrian15
2016-08-13 18:40   ` Andrei Borzenkov
2016-08-13 20:25     ` Steve Kenton
2016-08-14  7:13       ` Andrei Borzenkov
2016-08-14  9:09         ` Thomas Schmitt [this message]
2016-08-14 11:55           ` Andrei Borzenkov
2016-08-14 13:55             ` Thomas Schmitt
2016-08-14 15:44               ` Thomas Schmitt
2016-08-14 16:06                 ` Andrei Borzenkov
2016-08-14 18:24                   ` Thomas Schmitt
2016-08-14 16:05               ` Andrei Borzenkov
2016-08-14 12:32         ` Steve Kenton
2016-08-14 18:31           ` Adding partition guid/uuid to the probe command for use with Linux kernel command line root=PARTUUID=$guid Steve Kenton
2016-08-15  4:04             ` Andrei Borzenkov
2016-08-15  5:09               ` Steve Kenton
2016-08-14  4:12     ` Grub module to return partuuid of a device such as (hd0, gpt1) at boot time Michael Zimmermann
2016-08-14  6:42       ` Andrei Borzenkov
2016-08-13 20:30   ` Steve Kenton
  -- strict thread matches above, loose matches on Subject: below --
2016-08-15  2:43 Nick Vinson
2016-08-15  2:58 ` skenton
2016-08-15  3:47   ` Nick Vinson

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=21921588586603194286@scdbackup.webframe.org \
    --to=scdbackup@gmx.net \
    --cc=grub-devel@gnu.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).