From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3DF4921E1B749 for ; Thu, 21 Sep 2017 23:50:45 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP; 21 Sep 2017 23:53:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,427,1500966000"; d="scan'208";a="902821446" Received: from czhan46-mobl1.ccr.corp.intel.com ([10.239.192.165]) by FMSMGA003.fm.intel.com with ESMTP; 21 Sep 2017 23:53:51 -0700 From: "Zhang, Chao B" To: edk2-devel@lists.01.org Cc: jiewen.yao@intel.com, star.zeng@intel.com, Chao Zhang Date: Fri, 22 Sep 2017 14:53:43 +0800 Message-Id: <20170922065343.12660-1-chao.b.zhang@intel.com> X-Mailer: git-send-email 2.11.0.windows.1 Subject: [PATCH] SecurityPkg\SmmTcg2PhysicalPresenceLib.c Handle reserved or unimplemented PP Operation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 06:50:45 -0000 Several PP operations < 128(Vendor Specific) are reserved or unimplemented. Follow TCG PC Client Platform Physical Presence Interface Specification to return not implemented. https://trustedcomputinggroup.org/wp-content/uploads/Physical-Presence-Interface_1-30_0-52.pdf Cc: Jiewen Yao Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang --- .../SmmTcg2PhysicalPresenceLib.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c index ba4db11..6061453 100644 --- a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c +++ b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c @@ -10,7 +10,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction() and Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction() will receive untrusted input and do validation. -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -291,6 +291,7 @@ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction ( } break; + case TCG2_PHYSICAL_PRESENCE_NO_ACTION: case TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CLEAR_TRUE: RequestConfirmed = TRUE; break; @@ -336,12 +337,11 @@ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction ( break; default: - if (OperationRequest <= TCG2_PHYSICAL_PRESENCE_NO_ACTION_MAX) { - RequestConfirmed = TRUE; - } else { - if (OperationRequest < TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) { - return TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED; - } + if (OperationRequest < TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) { + // + // TCG PP spec defined operations that are reserved or un-implemented + // + return TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED; } break; } -- 1.9.5.msysgit.1