public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/2] Minor update to HSTI
@ 2017-07-14  8:53 Star Zeng
  2017-07-14  8:54 ` [PATCH 1/2] MdePkg Hsti.h: Update version info to 1.1a Star Zeng
  2017-07-14  8:54 ` [PATCH 2/2] MdePkg DxeHstiLib: Fix memory leak issue Star Zeng
  0 siblings, 2 replies; 5+ messages in thread
From: Star Zeng @ 2017-07-14  8:53 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng

Separated patch commit log has the change information.

Star Zeng (2):
  MdePkg Hsti.h: Update version info to 1.1a
  MdePkg DxeHstiLib: Fix memory leak issue

 MdePkg/Include/IndustryStandard/Hsti.h | 6 +++---
 MdePkg/Library/DxeHstiLib/HstiDxe.c    | 7 +++++--
 2 files changed, 8 insertions(+), 5 deletions(-)

-- 
2.7.0.windows.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] MdePkg Hsti.h: Update version info to 1.1a
  2017-07-14  8:53 [PATCH 0/2] Minor update to HSTI Star Zeng
@ 2017-07-14  8:54 ` Star Zeng
  2017-07-17  0:41   ` Yao, Jiewen
  2017-07-14  8:54 ` [PATCH 2/2] MdePkg DxeHstiLib: Fix memory leak issue Star Zeng
  1 sibling, 1 reply; 5+ messages in thread
From: Star Zeng @ 2017-07-14  8:54 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Jiewen Yao

The definition for 1.1a has no difference with 1.0.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 MdePkg/Include/IndustryStandard/Hsti.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/MdePkg/Include/IndustryStandard/Hsti.h b/MdePkg/Include/IndustryStandard/Hsti.h
index 1f118551a0c4..036b62cfe0e2 100644
--- a/MdePkg/Include/IndustryStandard/Hsti.h
+++ b/MdePkg/Include/IndustryStandard/Hsti.h
@@ -1,8 +1,8 @@
 /** @file
-  Support for HSTI 1.0 specification, defined at 
+  Support for HSTI 1.1a specification, defined at
   Microsoft Hardware Security Testability Specification.
 
-  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
   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
@@ -72,7 +72,7 @@ typedef struct {
   // which will describe the steps to remediate the failure - a URL to the
   // documentation is recommended.
   //
-//CHAR16	ErrorString[];
+//CHAR16  ErrorString[];
 } ADAPTER_INFO_PLATFORM_SECURITY;
 
 #pragma pack()
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] MdePkg DxeHstiLib: Fix memory leak issue
  2017-07-14  8:53 [PATCH 0/2] Minor update to HSTI Star Zeng
  2017-07-14  8:54 ` [PATCH 1/2] MdePkg Hsti.h: Update version info to 1.1a Star Zeng
@ 2017-07-14  8:54 ` Star Zeng
  2017-07-17  0:41   ` Yao, Jiewen
  1 sibling, 1 reply; 5+ messages in thread
From: Star Zeng @ 2017-07-14  8:54 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Jiewen Yao

The Hsti returned from InternalHstiFindAip() and temporally
allocated NewHsti need to be freed after used.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 MdePkg/Library/DxeHstiLib/HstiDxe.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/MdePkg/Library/DxeHstiLib/HstiDxe.c b/MdePkg/Library/DxeHstiLib/HstiDxe.c
index c032a98647bf..58510766bb43 100644
--- a/MdePkg/Library/DxeHstiLib/HstiDxe.c
+++ b/MdePkg/Library/DxeHstiLib/HstiDxe.c
@@ -1,6 +1,6 @@
 /** @file
 
-  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
   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
@@ -206,7 +206,7 @@ InternalHstiIsValidTable (
     }
   }
   if (Index == sizeof(Hsti->ImplementationID)/sizeof(Hsti->ImplementationID[0])) {
-    DEBUG ((EFI_D_ERROR, "ImplementationID is no NUL CHAR\n"));
+    DEBUG ((EFI_D_ERROR, "ImplementationID has no NUL CHAR\n"));
     return FALSE;
   }
 
@@ -416,6 +416,7 @@ InternalHstiRecordFeaturesVerified (
                   Hsti,
                   HstiSize
                   );
+  FreePool (Hsti);
   return Status;
 }
 
@@ -545,6 +546,8 @@ InternalHstiRecordErrorString (
                   NewHsti,
                   NewHstiSize
                   );
+  FreePool (Hsti);
+  FreePool (NewHsti);
   return Status;
 }
 
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] MdePkg Hsti.h: Update version info to 1.1a
  2017-07-14  8:54 ` [PATCH 1/2] MdePkg Hsti.h: Update version info to 1.1a Star Zeng
@ 2017-07-17  0:41   ` Yao, Jiewen
  0 siblings, 0 replies; 5+ messages in thread
From: Yao, Jiewen @ 2017-07-17  0:41 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org

Reviewed-by: Jiewen.yao@intel.com

> -----Original Message-----
> From: Zeng, Star
> Sent: Friday, July 14, 2017 4:54 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>
> Subject: [PATCH 1/2] MdePkg Hsti.h: Update version info to 1.1a
> 
> The definition for 1.1a has no difference with 1.0.
> 
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
>  MdePkg/Include/IndustryStandard/Hsti.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/MdePkg/Include/IndustryStandard/Hsti.h
> b/MdePkg/Include/IndustryStandard/Hsti.h
> index 1f118551a0c4..036b62cfe0e2 100644
> --- a/MdePkg/Include/IndustryStandard/Hsti.h
> +++ b/MdePkg/Include/IndustryStandard/Hsti.h
> @@ -1,8 +1,8 @@
>  /** @file
> -  Support for HSTI 1.0 specification, defined at
> +  Support for HSTI 1.1a specification, defined at
>    Microsoft Hardware Security Testability Specification.
> 
> -  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
>    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
> @@ -72,7 +72,7 @@ typedef struct {
>    // which will describe the steps to remediate the failure - a URL to the
>    // documentation is recommended.
>    //
> -//CHAR16	ErrorString[];
> +//CHAR16  ErrorString[];
>  } ADAPTER_INFO_PLATFORM_SECURITY;
> 
>  #pragma pack()
> --
> 2.7.0.windows.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] MdePkg DxeHstiLib: Fix memory leak issue
  2017-07-14  8:54 ` [PATCH 2/2] MdePkg DxeHstiLib: Fix memory leak issue Star Zeng
@ 2017-07-17  0:41   ` Yao, Jiewen
  0 siblings, 0 replies; 5+ messages in thread
From: Yao, Jiewen @ 2017-07-17  0:41 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org

Reviewed-by: Jiewen.yao@intel.com

> -----Original Message-----
> From: Zeng, Star
> Sent: Friday, July 14, 2017 4:54 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>
> Subject: [PATCH 2/2] MdePkg DxeHstiLib: Fix memory leak issue
> 
> The Hsti returned from InternalHstiFindAip() and temporally
> allocated NewHsti need to be freed after used.
> 
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
>  MdePkg/Library/DxeHstiLib/HstiDxe.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/MdePkg/Library/DxeHstiLib/HstiDxe.c
> b/MdePkg/Library/DxeHstiLib/HstiDxe.c
> index c032a98647bf..58510766bb43 100644
> --- a/MdePkg/Library/DxeHstiLib/HstiDxe.c
> +++ b/MdePkg/Library/DxeHstiLib/HstiDxe.c
> @@ -1,6 +1,6 @@
>  /** @file
> 
> -  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
>    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
> @@ -206,7 +206,7 @@ InternalHstiIsValidTable (
>      }
>    }
>    if (Index ==
> sizeof(Hsti->ImplementationID)/sizeof(Hsti->ImplementationID[0])) {
> -    DEBUG ((EFI_D_ERROR, "ImplementationID is no NUL CHAR\n"));
> +    DEBUG ((EFI_D_ERROR, "ImplementationID has no NUL CHAR\n"));
>      return FALSE;
>    }
> 
> @@ -416,6 +416,7 @@ InternalHstiRecordFeaturesVerified (
>                    Hsti,
>                    HstiSize
>                    );
> +  FreePool (Hsti);
>    return Status;
>  }
> 
> @@ -545,6 +546,8 @@ InternalHstiRecordErrorString (
>                    NewHsti,
>                    NewHstiSize
>                    );
> +  FreePool (Hsti);
> +  FreePool (NewHsti);
>    return Status;
>  }
> 
> --
> 2.7.0.windows.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-17  0:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-14  8:53 [PATCH 0/2] Minor update to HSTI Star Zeng
2017-07-14  8:54 ` [PATCH 1/2] MdePkg Hsti.h: Update version info to 1.1a Star Zeng
2017-07-17  0:41   ` Yao, Jiewen
2017-07-14  8:54 ` [PATCH 2/2] MdePkg DxeHstiLib: Fix memory leak issue Star Zeng
2017-07-17  0:41   ` Yao, Jiewen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox