linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Zhenzhong Duan <zhenzhong.duan@oracle.com>,
	Ben Hutchings <ben@decadent.org.uk>,
	Artem Savkov <artem.savkov@gmail.com>,
	Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>,
	Matt Fleming <matt.fleming@intel.com>
Subject: Re: [PATCH v2] firmware: dmi_scan: Fix ordering of product_uuid
Date: Fri, 17 Apr 2015 10:56:02 +0200	[thread overview]
Message-ID: <20150417105602.09da156a@endymion.delvare> (raw)
In-Reply-To: <20150417101325.296fc081@endymion.delvare>

On Fri, 17 Apr 2015 10:13:25 +0200, Jean Delvare wrote:
> In function dmi_present(), dmi_walk_early() calls dmi_table(), which
> calls dmi_decode(), which ultimately calls dmi_save_uuid(). This last
> function makes a decision based on the value of global variable
> dmi_ver. The problem is that this variable is set right _after_
> dmi_walk_early() returns. So dmi_save_uuid() always sees dmi_ver == 0
> regardless of the actual version implemented.
> 
> This causes /sys/class/dmi/id/product_uuid to always use the old
> ordering even on systems implementing DMI/SMBIOS 2.6 or later, which
> should use the new ordering.
> 
> This is broken since kernel v3.8 for legacy DMI implementations and
> since kernel v3.10 for SMBIOS 2 implementations. SMBIOS 3
> implementations with the 64-bit entry point are not affected.
> 
> The first breakage does not matter much as in practice legacy DMI
> implementations are always for versions older than 2.6, which is when
> the UUID ordering changed. The second breakage is more problematic as
> it affects the vast majority of x86 systems manufactured since 2009.
> 
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Fixes: 9f9c9cbb6057 ("drivers/firmware/dmi_scan.c: fetch dmi version from SMBIOS if it exists")
> Fixes: 79bae42d51a5 ("dmi_scan: refactor dmi_scan_machine(), {smbios,dmi}_present()")
> Acked-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
> Cc: Ben Hutchings <ben@decadent.org.uk>
> Cc: Artem Savkov <artem.savkov@gmail.com>
> Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
> Cc: Matt Fleming <matt.fleming@intel.com>
> Cc: stable@vger.kernel.org [v3.10+]
> ---
> Changes since v1:
>  * Rebased on torvalds/linux/master.

Bah, scratch that, I have come up with a different approach that will
make backporting this fix easier. Sorry for the noise.

-- 
Jean Delvare
SUSE L3 Support

      reply	other threads:[~2015-04-17  8:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17  8:13 [PATCH v2] firmware: dmi_scan: Fix ordering of product_uuid Jean Delvare
2015-04-17  8:56 ` Jean Delvare [this message]

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=20150417105602.09da156a@endymion.delvare \
    --to=jdelvare@suse.de \
    --cc=artem.savkov@gmail.com \
    --cc=ben@decadent.org.uk \
    --cc=ivan.khoronzhuk@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=zhenzhong.duan@oracle.com \
    /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).