From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web12.3374.1594262810724939191 for ; Wed, 08 Jul 2020 19:46:50 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: zhichao.gao@intel.com) IronPort-SDR: TUa0LOMyMvWJKSzctGzQf3mSJpQZYvpwqZlbaFsJf97JDsR+lMc/92iXqgP5lXUtLYHDPEWeZe LIqwgMuCm3wQ== X-IronPort-AV: E=McAfee;i="6000,8403,9676"; a="136160726" X-IronPort-AV: E=Sophos;i="5.75,330,1589266800"; d="scan'208";a="136160726" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2020 19:46:50 -0700 IronPort-SDR: eIFBwmSRVm0outTDjeZjCnXNzOytw3yT8ZLqARrAgo7TJXhHtBEvlJs8YARBXOu4OfQ0WaKTjd xnmhCdxJkfFg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,330,1589266800"; d="scan'208";a="283992389" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.114]) by orsmga006.jf.intel.com with ESMTP; 08 Jul 2020 19:46:48 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Terry Lee , Jiewen Yao , Jian J Wang , Chao Zhang Subject: [PATCH] SecurityPkg/Tcg2PhysicalPresenceLib: Fix incorrect TCG VER comparision Date: Thu, 9 Jul 2020 10:46:47 +0800 Message-Id: <20200709024647.31672-1-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Terry Lee REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2697 Tcg2PhysicalPresenceLibConstructor set the module variable mIsTcg2PPVerLowerThan_1_3 with incorrect TCG version comparision. Cc: Jiewen Yao Cc: Jian J Wang Cc: Chao Zhang Signed-off-by: Zhichao Gao --- .../SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c index 1c46d5e69d..8afaa0a785 100644 --- a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c +++ b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c @@ -387,7 +387,7 @@ Tcg2PhysicalPresenceLibConstructor ( { EFI_STATUS Status; - if (AsciiStrnCmp(PP_INF_VERSION_1_2, (CHAR8 *)PcdGetPtr(PcdTcgPhysicalPresenceInterfaceVer), sizeof(PP_INF_VERSION_1_2) - 1) <= 0) { + if (AsciiStrnCmp(PP_INF_VERSION_1_2, (CHAR8 *)PcdGetPtr(PcdTcgPhysicalPresenceInterfaceVer), sizeof(PP_INF_VERSION_1_2) - 1) >= 0) { mIsTcg2PPVerLowerThan_1_3 = TRUE; } -- 2.21.0.windows.1