From nobody Wed May 8 11:38:06 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1506063235998991.8266701819794; Thu, 21 Sep 2017 23:53:55 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EFF8921ECCB3D; Thu, 21 Sep 2017 23:50:46 -0700 (PDT) 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 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 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,427,1500966000"; d="scan'208";a="902821446" From: "Zhang, Chao B" To: edk2-devel@lists.01.org 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: [edk2] [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: , Cc: jiewen.yao@intel.com, Chao Zhang , star.zeng@intel.com MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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-Inte= rface_1-30_0-52.pdf Cc: Jiewen Yao Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang Reviewed-by: Jiewen.yao@intel.com Reviewed-by: Star Zeng --- .../SmmTcg2PhysicalPresenceLib.c | 14 +++++++---= ---- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2Physical= PresenceLib.c b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2Physi= calPresenceLib.c index ba4db11..6061453 100644 --- a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenc= eLib.c +++ b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenc= eLib.c @@ -10,7 +10,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction() and Tcg2PhysicalPr= esenceLibGetUserConfirmationStatusFunction() will receive untrusted input and do validation. =20 -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials=20 are licensed and made available under the terms and conditions of the BSD = License=20 which accompanies this distribution. The full text of the license may be = found at=20 @@ -291,6 +291,7 @@ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunctio= n ( } break; =20 + case TCG2_PHYSICAL_PRESENCE_NO_ACTION: case TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CLEAR_TRUE: RequestConfirmed =3D TRUE; break; @@ -336,12 +337,11 @@ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunct= ion ( break; =20 default: - if (OperationRequest <=3D TCG2_PHYSICAL_PRESENCE_NO_ACTION_MAX) { - RequestConfirmed =3D TRUE; - } else { - if (OperationRequest < TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPER= ATION) { - return TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED; - } + if (OperationRequest < TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERAT= ION) { + // + // TCG PP spec defined operations that are reserved or un-implemen= ted + // + return TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED; } break; } --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel