4a6338
From e1dfe0aec7bf2bc7f906f65ca1d5c82bd23d8f33 Mon Sep 17 00:00:00 2001
4a6338
From: Jean Delvare <jdelvare@suse.de>
4a6338
Date: Tue, 29 Jan 2019 14:11:42 +0100
4a6338
Subject: [PATCH 02/11] dmidecode: Document how the UUID fields are interpreted
4a6338
4a6338
There has always been a lot of confusion about the byte order of UUID
4a6338
fields. While dmidecode is doing "the right thing", documenting it
4a6338
can't hurt.
4a6338
4a6338
This should address bug #55510:
4a6338
https://savannah.nongnu.org/bugs/index.php?55510
4a6338
4a6338
Signed-off-by: Jean Delvare <jdelvare@suse.de>
4a6338
---
4a6338
 man/dmidecode.8 | 14 ++++++++++++++
4a6338
 1 file changed, 14 insertions(+)
4a6338
4a6338
diff --git a/man/dmidecode.8 b/man/dmidecode.8
4a6338
index 33f7d33bd5ef..52100a82435e 100644
4a6338
--- a/man/dmidecode.8
4a6338
+++ b/man/dmidecode.8
4a6338
@@ -256,6 +256,20 @@ It is crafted to hard-code the table address at offset 0x20.
4a6338
 .IP \(bu "\w'\(bu'u+1n"
4a6338
 The DMI table is located at offset 0x20.
4a6338
 
4a6338
+.SH UUID FORMAT
4a6338
+There is some ambiguity about how to interpret the UUID fields prior to SMBIOS
4a6338
+specification version 2.6. There was no mention of byte swapping, and RFC 4122
4a6338
+says that no byte swapping should be applied by default. However, SMBIOS
4a6338
+specification version 2.6 (and later) explicitly states that the first 3 fields
4a6338
+of the UUID should be read as little-endian numbers (byte-swapped).
4a6338
+Furthermore, it implies that the same was already true for older versions of
4a6338
+the specification, even though it was not mentioned. In practice, many hardware
4a6338
+vendors were not byte-swapping the UUID. So, in order to preserve
4a6338
+compatibility, it was decided to interpret the UUID fields according to RFC
4a6338
+4122 (no byte swapping) when the SMBIOS version is older than 2.6, and to
4a6338
+interpret the first 3 fields as little-endian (byte-swapped) when the SMBIOS
4a6338
+version is 2.6 or later. The Linux kernel follows the same logic.
4a6338
+
4a6338
 .SH FILES
4a6338
 .I /dev/mem
4a6338
 .br
4a6338
-- 
4a6338
2.17.1
4a6338