From nobody Tue Feb 10 03:57:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+105394+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+105394+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1685380016; cv=none; d=zohomail.com; s=zohoarc; b=SGxaQsmUoi+xIM71PcO5P6cH8ypRSo+STvp0TlSpIRNHlkL6EyJ3VLgJlnafyhzCL6iQDyKqB9/8vNldSyYjbXDBab8DfMTAJofwVtPxzy2Pnb22nFw8xCv5wBS6TN/afYL0pCpmJM4TZ76b7z67qTuMypqsW2DYLzz+zEzsC74= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685380016; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=D1hJVDzBL3nIeSouuCeQ/3BBH9kpuzEv9DEXKr8ImU4=; b=hZwwX3HR8plgPoPl4vw+IbCi4irDKsSinrgkMk4EYVMd+JpV5Ff6HsMWEPbs8/sr9GbBg+edLm29s5/b4Weea8ytYQrMHfEfvx4kqOn7PPoO4iczjxOpk89PFCuqtUvHti2Kq5sxWI/6zCjDS7+q0w5wpMxvEA6JcaKqJt6egi4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+105394+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1685380016989666.4709250770827; Mon, 29 May 2023 10:06:56 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id vRBmYY1788612xj0kMfd1BWS; Mon, 29 May 2023 10:06:56 -0700 X-Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.54444.1685380015619330406 for ; Mon, 29 May 2023 10:06:55 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10725"; a="352246063" X-IronPort-AV: E=Sophos;i="6.00,201,1681196400"; d="scan'208";a="352246063" X-Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 May 2023 10:06:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10725"; a="709350938" X-IronPort-AV: E=Sophos;i="6.00,201,1681196400"; d="scan'208";a="709350938" X-Received: from mdkinney-mobl.amr.corp.intel.com ([10.209.9.14]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 May 2023 10:06:54 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Oliver Smith-Denny , Pedro Falcato , Aaron Pop Subject: [edk2-devel] [Patch 2/2] SecurityPkg/Library/TpmCommandLib: Change xor to Xor Date: Mon, 29 May 2023 10:06:49 -0700 Message-Id: <20230529170649.1506-3-michael.d.kinney@intel.com> In-Reply-To: <20230529170649.1506-1-michael.d.kinney@intel.com> References: <20230529170649.1506-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com X-Gm-Message-State: 1AEiOrE2QVm3mBPWmRp2Y6Hgx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1685380016; bh=FMiZ6aA6aN8iA6VxOmd57DCh9iIMpgzog/9e3ytyOTo=; h=Cc:Date:From:Reply-To:Subject:To; b=Oy7n02Q5s35IRSRg2g1lq+joVlOOzAo/tEk60i6AFfSFmL6gw72GxLBee6aCApysGP3 hq8L/qA8FowA2cwNLFAQEIBdYW+9yDN6hl/VJDOyAdqF+0UjuJB0KVkumi0/wcL4NJzT4 PSpxsUNROBVeWHAs4dKrwzfIN9I8HZGfPj4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1685380017412100006 Content-Type: text/plain; charset="utf-8" Change xor to Xor to avoid C++ reserved work name collisions when building with C++ compilers. NOTE: This is a non-backwards compatible change to Tpm12.h and Tmp20.h. And consumers of these include files that access the "operator" or "xor" fields must be updated. Cc: Jiewen Yao Cc: Jian J Wang Cc: Oliver Smith-Denny Cc: Pedro Falcato Cc: Aaron Pop Signed-off-by: Michael D Kinney --- SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c | 6 +++--- SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c | 6 +++--- SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c b/Security= Pkg/Library/Tpm2CommandLib/Tpm2Capability.c index f0e6019a47be..f8c781a445a1 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c @@ -734,9 +734,9 @@ Tpm2TestParms ( Buffer +=3D sizeof (UINT16); break; case TPM_ALG_XOR: - WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->par= ameters.keyedHashDetail.scheme.details.xor.hashAlg)); + WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->par= ameters.keyedHashDetail.scheme.details.Xor.hashAlg)); Buffer +=3D sizeof (UINT16); - WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->par= ameters.keyedHashDetail.scheme.details.xor.kdf)); + WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->par= ameters.keyedHashDetail.scheme.details.Xor.kdf)); Buffer +=3D sizeof (UINT16); break; default: @@ -761,7 +761,7 @@ Tpm2TestParms ( Buffer +=3D sizeof (UINT16); break; case TPM_ALG_XOR: - WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->par= ameters.symDetail.keyBits.xor)); + WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->par= ameters.symDetail.keyBits.Xor)); Buffer +=3D sizeof (UINT16); break; case TPM_ALG_NULL: diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c b/SecurityPkg/= Library/Tpm2CommandLib/Tpm2Object.c index 335957d6cedc..578a61b20339 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c @@ -169,9 +169,9 @@ Tpm2ReadPublic ( Buffer = +=3D sizeof (UINT16); break; case TPM_ALG_XOR: - OutPublic->publicArea.parameters.keyedHashDetail.scheme.details.= xor.hashAlg =3D SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); + OutPublic->publicArea.parameters.keyedHashDetail.scheme.details.= Xor.hashAlg =3D SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); Buffer = +=3D sizeof (UINT16); - OutPublic->publicArea.parameters.keyedHashDetail.scheme.details.= xor.kdf =3D SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); + OutPublic->publicArea.parameters.keyedHashDetail.scheme.details.= Xor.kdf =3D SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); Buffer = +=3D sizeof (UINT16); break; default: @@ -195,7 +195,7 @@ Tpm2ReadPublic ( Buffer +=3D sizeo= f (UINT16); break; case TPM_ALG_XOR: - OutPublic->publicArea.parameters.symDetail.keyBits.xor =3D SwapB= ytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); + OutPublic->publicArea.parameters.symDetail.keyBits.Xor =3D SwapB= ytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); Buffer +=3D sizeo= f (UINT16); break; case TPM_ALG_NULL: diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c b/SecurityPkg= /Library/Tpm2CommandLib/Tpm2Session.c index 7f247da301fe..e17318b6e6fb 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c @@ -119,7 +119,7 @@ Tpm2StartAuthSession ( Buffer +=3D sizeof (UINT16); break; case TPM_ALG_XOR: - WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Symmetric->keyBits.= xor)); + WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Symmetric->keyBits.= Xor)); Buffer +=3D sizeof (UINT16); break; default: --=20 2.40.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#105394): https://edk2.groups.io/g/devel/message/105394 Mute This Topic: https://groups.io/mt/99204101/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076= /xyzzy [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-