Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754845AbbLVPR4 (ORCPT ); Tue, 22 Dec 2015 10:17:56 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:36562 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753298AbbLVPRy (ORCPT ); Tue, 22 Dec 2015 10:17:54 -0500 Date: Tue, 22 Dec 2015 15:17:51 +0000 From: Matt Fleming To: Andrea Arcangeli Cc: Ivan Khoronzhuk , Paolo Bonzini , Federico Simoncelli , linux-kernel@vger.kernel.org, Andrew Morton , Jean Delvare Subject: Re: [PATCH 1/1] dmi_scan: uuid: fix endianess for smbios >= 0x206 Message-ID: <20151222151751.GA2279@codeblueprint.co.uk> References: <1450792390-27853-1-git-send-email-aarcange@redhat.com> <1450792390-27853-2-git-send-email-aarcange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1450792390-27853-2-git-send-email-aarcange@redhat.com> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1987 Lines: 51 (Cc'ing Jean since he's the maintainer) On Tue, 22 Dec, at 02:53:10PM, Andrea Arcangeli wrote: > The dmi_ver wasn't updated correctly before the dmi_decode method run > to save the uuid. > > That resulted in "dmidecode -s system-uuid" and > /sys/class/dmi/id/product_uuid disagreeing. The latter was buggy and > this fixes it. > > Reported-by: Federico Simoncelli > Signed-off-by: Andrea Arcangeli > --- > drivers/firmware/dmi_scan.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c > index ac1ce4a..0e08e66 100644 > --- a/drivers/firmware/dmi_scan.c > +++ b/drivers/firmware/dmi_scan.c > @@ -521,6 +521,7 @@ static int __init dmi_present(const u8 *buf) > dmi_ver = smbios_ver; > else > dmi_ver = (buf[14] & 0xF0) << 4 | (buf[14] & 0x0F); > + dmi_ver <<= 8; > dmi_num = get_unaligned_le16(buf + 12); > dmi_len = get_unaligned_le16(buf + 6); > dmi_base = get_unaligned_le32(buf + 8); > @@ -528,15 +529,14 @@ static int __init dmi_present(const u8 *buf) > if (dmi_walk_early(dmi_decode) == 0) { > if (smbios_ver) { > pr_info("SMBIOS %d.%d present.\n", > - dmi_ver >> 8, dmi_ver & 0xFF); > + dmi_ver >> 16, (dmi_ver >> 8) & 0xFF); > } else { > smbios_entry_point_size = 15; > memcpy(smbios_entry_point, buf, > smbios_entry_point_size); > pr_info("Legacy DMI %d.%d present.\n", > - dmi_ver >> 8, dmi_ver & 0xFF); > + dmi_ver >> 16, (dmi_ver >> 8) & 0xFF); > } > - dmi_ver <<= 8; > dmi_format_ids(dmi_ids_string, sizeof(dmi_ids_string)); > printk(KERN_DEBUG "DMI: %s\n", dmi_ids_string); > return 0; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/