From patchwork Mon Mar 19 03:40:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Fischer X-Patchwork-Id: 1708 Return-Path: Received: from mail01.ipfire.org (mail01.ipfire.org [IPv6:2001:470:7183:25::1]) by web02.i.ipfire.org (Postfix) with ESMTP id 54EEC6033C for ; Sun, 18 Mar 2018 17:41:19 +0100 (CET) X-Virus-Scanned: ClamAV at mail01.ipfire.org X-Spam-Flag: NO X-Spam-Score: -1.1 X-Spam-Level: X-Spam-Status: No, score=-1.1 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1] autolearn=disabled Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 65BE010DFEA9; Sun, 18 Mar 2018 16:41:17 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ipfire.org; s=201801; t=1521391277; x=1523983277; bh=ZwwDOhLh7Fyb5VZ3bh+r8z2Upm2udrBhQkk4m9C4VYM=; h=From:To:Subject:Date:Message-Id:Sender:From:To:Cc:Date: Content-Type:Message-ID:In-Reply-To:Subject:Reply-To:Sender; b=1GsbeZ+xiM4n+D0TIiforPGDZ+KAw9HoIEcTteqtnmC03wg9yMOf/hXbn9Dkl5Kak jYrrh99DWsb61cDsAm0sZhZg+gTWKV5qXQUNbi95dNVP1HglK4RJ8jsrlGSs2jBniw ax7dC3qcEQLebvk/FZin2Xf2gBn9FmLzDpJnIdyYUiiqYCcoJyyMPb5NXb3U46goR+ 3+/s0LqHjBnkKY8YIT4lCV7d8q0qRIdSgUjS0a5ohObx1BXT9BECeUidE2vFWFehHV lS55MCsPwhb3X0k0Gv27p3ntId8Yjjtx8sbcqcr+3mWRhNzwtzMdGhi3qUHcDpAS+k NzvJZcgocdp7Q== X-Virus-Scanned: ClamAV at mail01.ipfire.org Received: from Devel.localdomain (p5B0A20A2.dip0.t-ipconnect.de [91.10.32.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id F1BF5108C3AA for ; Sun, 18 Mar 2018 16:40:51 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ipfire.org; s=201801; t=1521391252; x=1523983252; bh=ZwwDOhLh7Fyb5VZ3bh+r8z2Upm2udrBhQkk4m9C4VYM=; h=From:To:Subject:Date:Message-Id:From:To:Cc:Date:Content-Type: Message-ID:In-Reply-To:Subject:Reply-To:Sender; b=HVvtpeb0/SC6LCasO4r8pVA4jrft3OEO8wXY48uAHZGmZLQFK6SS0VP1gFM/Xrpq5 EGG/XjJOeZkjHLyihJcWhJLxOBJDcE17oXqDSS9qxouHEYStmDTK5eCSvo4mwF6nQi Ssfl+s4dPqdJ8xyBbdTM77Bro8lPbCjwMur4XFJbI3t+uH1Qs9nwfS2BgIK1Jlfw8X 1Rc+s6NhHptY6SLT33LZnAn6Xu7L01ymvhoKeA+THjbWMgUnDH+1tLO5E0Ewnu4FMQ +VtBKAeLh3YYD4UL/g6EA0VT9wD2gX/HR0/hcomQp3k6ZBKBM2J2EZLlRf1rtnluv0 YhoZ3YzevwXaw== From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH] dmidecode 3.1: Added patch (Fix firmware version of TPM device) Date: Sun, 18 Mar 2018 17:40:47 +0100 Message-Id: <20180318164047.21883-1-matthias.fischer@ipfire.org> X-Mailer: git-send-email 2.16.2 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" For details see: http://git.savannah.gnu.org/cgit/dmidecode.git/commit/?id=174387405e98cd94c627832ae23abcb9be7e5623 "Both the operator (detected by clang, reported by Xorg) and the mask for the minor firmware version field of TPM devices were wrong." Best, Matthias Signed-off-by: Matthias Fischer --- lfs/dmidecode | 3 ++- ..._support_for_structure_type_43_tpm_device.patch | 30 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 src/patches/dmidecode/add_support_for_structure_type_43_tpm_device.patch diff --git a/lfs/dmidecode b/lfs/dmidecode index 8f8a2491c..fa0101594 100644 --- a/lfs/dmidecode +++ b/lfs/dmidecode @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2016 IPFire Team # +# Copyright (C) 2018 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -71,6 +71,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dmidecode/0005-nothing-should-go-into-usr-local.patch + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dmidecode/add_support_for_structure_type_43_tpm_device.patch cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE) cd $(DIR_APP) && make install @rm -rf $(DIR_APP) diff --git a/src/patches/dmidecode/add_support_for_structure_type_43_tpm_device.patch b/src/patches/dmidecode/add_support_for_structure_type_43_tpm_device.patch new file mode 100644 index 000000000..07f4f7ed7 --- /dev/null +++ b/src/patches/dmidecode/add_support_for_structure_type_43_tpm_device.patch @@ -0,0 +1,30 @@ +From 174387405e98cd94c627832ae23abcb9be7e5623 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Wed, 31 Jan 2018 18:52:47 +0100 +Subject: dmidecode: Fix firmware version of TPM device + +Both the operator (detected by clang, reported by Xorg) and the mask +for the minor firmware version field of TPM devices were wrong. + +Signed-off-by: Jean Delvare +Fixes: 48a8132058a0 ("dmidecode: Add support for structure type 43 (TPM Device)") +--- + dmidecode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dmidecode.c b/dmidecode.c +index 87faaa9..a593170 100644 +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -4511,7 +4511,7 @@ static void dmi_decode(const struct dmi_header *h, u16 ver) + case 0x02: + printf("\tFirmware Revision: %u.%u\n", + DWORD(data + 0x0A) >> 16, +- DWORD(data + 0x0A) && 0xFF); ++ DWORD(data + 0x0A) & 0xFFFF); + /* + * We skip the next 4 bytes, as their + * format is not standardized and their +-- +cgit v1.0-41-gc330 +