lkml.org 
[lkml]   [2018]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Revert "firmware: dmi_scan: Use lowercase letters for UUID"
From
Date
On Wed, 2018-12-05 at 22:13 +0100, Peter Korsgaard wrote:
> This reverts commit 712ff25450bd01366301eef81c33e865d901e7b7.
>
> The output of dmi_save_uuid() is exposed to user space as
> /sys/devices/virtual/dmi/id/*_uuid, so this breaks backwards compatibility,
> E.G. I have systems that include the content of dmi/id/product_uuid as part
> of the keyphrase for cryptsetup luksOpen.
>
> As the change was purely cosmetical, revert it to fix such breakage.

The change is not "cosmetical". The change was done to comply with RFC
4122:

https://tools.ietf.org/html/rfc4122

The hexadecimal values "a" through "f" are output as
lower case characters and are case insensitive on input.

If "cryptsetup luksOpen" does not lowercase digits before computing its
key passphrase, then it's not RFC 4122-compliant and should be fixed.

> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
> drivers/firmware/dmi_scan.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
> index 099d83e4e910..2ed51651565f 100644
> --- a/drivers/firmware/dmi_scan.c
> +++ b/drivers/firmware/dmi_scan.c
> @@ -211,9 +211,9 @@ static void __init dmi_save_uuid(const struct dmi_header *dm, int slot,
> * says that this is the defacto standard.
> */
> if (dmi_ver >= 0x020600)
> - sprintf(s, "%pUl", d);
> + sprintf(s, "%pUL", d);
> else
> - sprintf(s, "%pUb", d);
> + sprintf(s, "%pUB", d);
>
> dmi_ident[slot] = s;
> }

Nak. This is too late. Changing it again would just add confusion.

--
Jean Delvare
SUSE L3 Support

\
 
 \ /
  Last update: 2018-12-06 09:55    [W:0.070 / U:3.240 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site