[edk2-devel] [PATCH] CoffeelakeSiliconPkg: Add a needed ZeroMem ()

Nate DeSimone posted 1 patch 5 years, 2 months ago
Failed in applying to current master (apply log)
.../Library/BaseSiConfigBlockLib/BaseSiConfigBlockLib.c          | 1 +
1 file changed, 1 insertion(+)
[edk2-devel] [PATCH] CoffeelakeSiliconPkg: Add a needed ZeroMem ()
Posted by Nate DeSimone 5 years, 2 months ago
AddComponentConfigBlocks () should ZeroMem () the Config Block Header before using it.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
 .../Library/BaseSiConfigBlockLib/BaseSiConfigBlockLib.c          | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/BaseSiConfigBlockLib.c b/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/BaseSiConfigBlockLib.c
index 16a14b3245..3c02a4563c 100644
--- a/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/BaseSiConfigBlockLib.c
+++ b/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/BaseSiConfigBlockLib.c
@@ -75,6 +75,7 @@ AddComponentConfigBlocks (
   // Loop to identify each config block from ComponentBlocks[] Table and add each of them
   //
   for (BlockCount = 0 ; BlockCount < TotalBlockCount; BlockCount++) {
+    ZeroMem (&ConfigBlockBuf, sizeof (CONFIG_BLOCK));
     CopyMem (&(ConfigBlockBuf.Header.GuidHob.Name), ComponentBlocks[BlockCount].Guid, sizeof (EFI_GUID));
     ConfigBlockBuf.Header.GuidHob.Header.HobLength = ComponentBlocks[BlockCount].Size;
     ConfigBlockBuf.Header.Revision        = ComponentBlocks[BlockCount].Revision;
-- 
2.17.1.windows.2


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46597): https://edk2.groups.io/g/devel/message/46597
Mute This Topic: https://groups.io/mt/33073966/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] CoffeelakeSiliconPkg: Add a needed ZeroMem ()
Posted by Kubacki, Michael A 5 years, 2 months ago
In the future, the subject should include [edk2-platforms] for patches in the repo.

Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Nate
> DeSimone
> Sent: Thursday, August 29, 2019 4:00 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>; Chaganty, Rangasai V
> <rangasai.v.chaganty@intel.com>
> Subject: [edk2-devel] [PATCH] CoffeelakeSiliconPkg: Add a needed
> ZeroMem ()
> 
> AddComponentConfigBlocks () should ZeroMem () the Config Block Header
> before using it.
> 
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Michael Kubacki <michael.a.kubacki@intel.com>
> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> ---
>  .../Library/BaseSiConfigBlockLib/BaseSiConfigBlockLib.c          | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git
> a/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/BaseSiCon
> figBlockLib.c
> b/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/BaseSiCon
> figBlockLib.c
> index 16a14b3245..3c02a4563c 100644
> ---
> a/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/BaseSiCon
> figBlockLib.c
> +++
> b/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/BaseSiCon
> figBlockLib.c
> @@ -75,6 +75,7 @@ AddComponentConfigBlocks (
>    // Loop to identify each config block from ComponentBlocks[] Table and
> add each of them
>    //
>    for (BlockCount = 0 ; BlockCount < TotalBlockCount; BlockCount++) {
> +    ZeroMem (&ConfigBlockBuf, sizeof (CONFIG_BLOCK));
>      CopyMem (&(ConfigBlockBuf.Header.GuidHob.Name),
> ComponentBlocks[BlockCount].Guid, sizeof (EFI_GUID));
>      ConfigBlockBuf.Header.GuidHob.Header.HobLength =
> ComponentBlocks[BlockCount].Size;
>      ConfigBlockBuf.Header.Revision        =
> ComponentBlocks[BlockCount].Revision;
> --
> 2.17.1.windows.2
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46598): https://edk2.groups.io/g/devel/message/46598
Mute This Topic: https://groups.io/mt/33073966/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] CoffeelakeSiliconPkg: Add a needed ZeroMem ()
Posted by Chiu, Chasel 5 years, 2 months ago
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>

> -----Original Message-----
> From: Kubacki, Michael A
> Sent: Friday, August 30, 2019 7:16 AM
> To: devel@edk2.groups.io; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Chaganty, Rangasai V
> <rangasai.v.chaganty@intel.com>
> Subject: RE: [edk2-devel] [PATCH] CoffeelakeSiliconPkg: Add a needed
> ZeroMem ()
> 
> In the future, the subject should include [edk2-platforms] for patches in the
> repo.
> 
> Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Nate
> > DeSimone
> > Sent: Thursday, August 29, 2019 4:00 PM
> > To: devel@edk2.groups.io
> > Cc: Chiu, Chasel <chasel.chiu@intel.com>; Kubacki, Michael A
> > <michael.a.kubacki@intel.com>; Chaganty, Rangasai V
> > <rangasai.v.chaganty@intel.com>
> > Subject: [edk2-devel] [PATCH] CoffeelakeSiliconPkg: Add a needed
> > ZeroMem ()
> >
> > AddComponentConfigBlocks () should ZeroMem () the Config Block Header
> > before using it.
> >
> > Cc: Chasel Chiu <chasel.chiu@intel.com>
> > Cc: Michael Kubacki <michael.a.kubacki@intel.com>
> > Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
> > Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> > ---
> >  .../Library/BaseSiConfigBlockLib/BaseSiConfigBlockLib.c          | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git
> > a/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/Base
> > SiCon
> > figBlockLib.c
> > b/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/Base
> > SiCon
> > figBlockLib.c
> > index 16a14b3245..3c02a4563c 100644
> > ---
> > a/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/Base
> > SiCon
> > figBlockLib.c
> > +++
> > b/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/Base
> > SiCon
> > figBlockLib.c
> > @@ -75,6 +75,7 @@ AddComponentConfigBlocks (
> >    // Loop to identify each config block from ComponentBlocks[] Table
> > and add each of them
> >    //
> >    for (BlockCount = 0 ; BlockCount < TotalBlockCount; BlockCount++) {
> > +    ZeroMem (&ConfigBlockBuf, sizeof (CONFIG_BLOCK));
> >      CopyMem (&(ConfigBlockBuf.Header.GuidHob.Name),
> > ComponentBlocks[BlockCount].Guid, sizeof (EFI_GUID));
> >      ConfigBlockBuf.Header.GuidHob.Header.HobLength =
> > ComponentBlocks[BlockCount].Size;
> >      ConfigBlockBuf.Header.Revision        =
> > ComponentBlocks[BlockCount].Revision;
> > --
> > 2.17.1.windows.2
> >
> >
> > 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46619): https://edk2.groups.io/g/devel/message/46619
Mute This Topic: https://groups.io/mt/33073966/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-