[edk2-devel] [RFC PATCH 3/7] SecurityPkg/TPM: Disable PcdGetBool (PcdRandomizePlatformHierarchy)

Stefan Berger posted 7 patches 4 years, 6 months ago
[edk2-devel] [RFC PATCH 3/7] SecurityPkg/TPM: Disable PcdGetBool (PcdRandomizePlatformHierarchy)
Posted by Stefan Berger 4 years, 6 months ago
To avoid this type of build errors, disable
'PcdGetBool (PcdRandomizePlatformHierarchy)'.

Building ... /home/stefanb/dev/edk2/SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.inf [X64]
In file included from /home/stefanb/dev/edk2/Build/OvmfX64/DEBUG_GCC5/X64/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib/DEBUG/AutoGen.h:17,
                 from <command-line>:
/home/stefanb/dev/edk2/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.c: In function ‘ConfigureTpmPlatformHierarchy’:
/home/stefanb/dev/edk2/MdePkg/Include/Library/PcdLib.h:424:45: error: ‘_PCD_GET_MODE_BOOL_PcdRandomizePlatformHierarchy’ undeclared (first use in this function)
  424 | #define PcdGetBool(TokenName)               _PCD_GET_MODE_BOOL_##TokenName
      |                                             ^~~~~~~~~~~~~~~~~~~

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
---
 .../PeiDxeTpmPlatformHierarchyLib.c                             | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.c b/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.c
index 9812ab99ab..bea10d37a4 100644
--- a/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.c
+++ b/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.c
@@ -252,7 +252,7 @@ EFIAPI
 ConfigureTpmPlatformHierarchy (

   )

 {

-  if (PcdGetBool (PcdRandomizePlatformHierarchy)) {

+  if (1 /*PcdGetBool (PcdRandomizePlatformHierarchy)*/) {

     //

     // Send Tpm2HierarchyChange Auth with random value to avoid PlatformAuth being null

     //

-- 
2.31.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78823): https://edk2.groups.io/g/devel/message/78823
Mute This Topic: https://groups.io/mt/84712028/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [RFC PATCH 3/7] SecurityPkg/TPM: Disable PcdGetBool (PcdRandomizePlatformHierarchy)
Posted by Yao, Jiewen 4 years, 6 months ago
Stefan
This patch is NOT acceptable.

> +  if (1 /*PcdGetBool (PcdRandomizePlatformHierarchy)*/) {

Nacked-by: Jiewen Yao <Jiewen.yao@intel.com>

Thank you
Yao Jiewen


> -----Original Message-----
> From: Stefan Berger <stefanb@linux.vnet.ibm.com>
> Sent: Friday, August 6, 2021 11:33 PM
> To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>
> Cc: marcandre.lureau@redhat.com; lersek@redhat.com;
> dick_wilkins@phoenix.com; Stefan Berger <stefanb@linux.vnet.ibm.com>;
> Stefan Berger <stefanb@linux.ibm.com>
> Subject: [RFC PATCH 3/7] SecurityPkg/TPM: Disable PcdGetBool
> (PcdRandomizePlatformHierarchy)
> 
> To avoid this type of build errors, disable
> 'PcdGetBool (PcdRandomizePlatformHierarchy)'.
> 
> Building ...
> /home/stefanb/dev/edk2/SecurityPkg/Library/SecureBootVariableProvisionLib/
> SecureBootVariableProvisionLib.inf [X64]
> In file included from
> /home/stefanb/dev/edk2/Build/OvmfX64/DEBUG_GCC5/X64/SecurityPkg/Librar
> y/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib/DEBUG/Aut
> oGen.h:17,
>                  from <command-line>:
> /home/stefanb/dev/edk2/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/
> PeiDxeTpmPlatformHierarchyLib.c: In function
> ‘ConfigureTpmPlatformHierarchy’:
> /home/stefanb/dev/edk2/MdePkg/Include/Library/PcdLib.h:424:45: error:
> ‘_PCD_GET_MODE_BOOL_PcdRandomizePlatformHierarchy’ undeclared (first
> use in this function)
>   424 | #define PcdGetBool(TokenName)
> _PCD_GET_MODE_BOOL_##TokenName
>       |                                             ^~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> ---
>  .../PeiDxeTpmPlatformHierarchyLib.c                             | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git
> a/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHier
> archyLib.c
> b/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHier
> archyLib.c
> index 9812ab99ab..bea10d37a4 100644
> ---
> a/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHier
> archyLib.c
> +++
> b/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHier
> archyLib.c
> @@ -252,7 +252,7 @@ EFIAPI
>  ConfigureTpmPlatformHierarchy (
> 
>    )
> 
>  {
> 
> -  if (PcdGetBool (PcdRandomizePlatformHierarchy)) {
> 
> +  if (1 /*PcdGetBool (PcdRandomizePlatformHierarchy)*/) {
> 
>      //
> 
>      // Send Tpm2HierarchyChange Auth with random value to avoid PlatformAuth
> being null
> 
>      //
> 
> --
> 2.31.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78842): https://edk2.groups.io/g/devel/message/78842
Mute This Topic: https://groups.io/mt/84712028/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-