Re: [edk2] [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: permit use by MM_STANDALONE modules

2019-01-18 Thread Yao, Jiewen
Reviewed-by: jiewen@intel.com

> -Original Message-
> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> Sent: Friday, January 18, 2019 3:13 AM
> To: Wang, Jian J 
> Cc: edk2-devel@lists.01.org; Kinney, Michael D
> ; Gao, Liming ; Ye,
> Ting ; Wei, Gang ; Zhang, Chao B
> ; Yao, Jiewen ; Wu, Hao
> A ; Zeng, Star ; Achin Gupta
> ; Jagadeesh Ujja 
> Subject: Re: [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: permit use by
> MM_STANDALONE modules
> 
> On Fri, 18 Jan 2019 at 08:06, Wang, Jian J  wrote:
> >
> >
> >
> > Reviewed-by: Jian J Wang 
> >
> 
> Chao, Jiewen, do you have any objections to this patch?
> 
> >
> > > -Original Message-
> > > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> > > Sent: Thursday, January 17, 2019 5:22 AM
> > > To: edk2-devel@lists.01.org
> > > Cc: Ard Biesheuvel ; Kinney, Michael D
> > > ; Gao, Liming ; Ye,
> Ting
> > > ; Wei, Gang ; Wang, Jian J
> > > ; Zhang, Chao B ;
> Yao,
> > > Jiewen ; Wu, Hao A ;
> Zeng, Star
> > > ; Achin Gupta ;
> Jagadeesh Ujja
> > > 
> > > Subject: [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: permit use by
> > > MM_STANDALONE modules
> > >
> > > Add MM_STANDALONE to the list of module types that are permitted to
> > > link to this library. Also, since the constructor prototype is
> > > different between MM_STANDALONE and DXE_DRIVER type libraries,
> > > convert the library into BASE type.
> > >
> > > Contributed-under: TianoCore Contribution Agreement 1.1
> > > Signed-off-by: Ard Biesheuvel 
> > > ---
> > >  SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> | 9 +-
> > > ---
> > >  SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf |
> 4 ++--
> > >  2 files changed, 7 insertions(+), 6 deletions(-)
> > >
> > > diff --git
> a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> > > b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> > > index 0c6ded22f3e6..b2493a029393 100644
> > > --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> > > +++
> b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> > > @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF
> ANY
> > > KIND, EITHER EXPRESS OR IMPLIED.
> > >
> > >  **/
> > >
> > > +#include 
> > > +
> > >  BOOLEAN   mUserPhysicalPresence  = FALSE;
> > >
> > >  /**
> > > @@ -53,15 +55,14 @@ UserPhysicalPresent (
> > >@retval  EFI_SUCCESS  PcdUserPhysicalPresence is got
> successfully.
> > >
> > >  **/
> > > -EFI_STATUS
> > > +RETURN_STATUS
> > >  EFIAPI
> > >  PlatformSecureLibNullConstructor (
> > > -  IN EFI_HANDLEImageHandle,
> > > -  IN EFI_SYSTEM_TABLE  *SystemTable
> > > +  VOID
> > >)
> > >  {
> > >
> > >mUserPhysicalPresence = PcdGetBool(PcdUserPhysicalPresence);
> > >
> > > -  return EFI_SUCCESS;
> > > +  return RETURN_SUCCESS;
> > >  }
> > > diff --git
> a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> > > b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> > > index 979a33705de0..70051a27a0a9 100644
> > > ---
> a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> > > +++
> b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> > > @@ -21,9 +21,9 @@ [Defines]
> > >BASE_NAME  = PlatformSecureLibNull
> > >MODULE_UNI_FILE= PlatformSecureLibNull.uni
> > >FILE_GUID  =
> 7FA68D82-10A4-4e71-9524-D3D9500D3CDF
> > > -  MODULE_TYPE= DXE_DRIVER
> > > +  MODULE_TYPE= BASE
> > >VERSION_STRING = 1.0
> > > -  LIBRARY_CLASS  =
> PlatformSecureLib|DXE_RUNTIME_DRIVER
> > > DXE_SMM_DRIVER DXE_DRIVER
> > > +  LIBRARY_CLASS  =
> PlatformSecureLib|DXE_RUNTIME_DRIVER
> > > DXE_SMM_DRIVER DXE_DRIVER MM_STANDALONE
> > >CONSTRUCTOR=
> PlatformSecureLibNullConstructor
> > >
> > >  #
> > > --
> > > 2.17.1
> >
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: permit use by MM_STANDALONE modules

2019-01-18 Thread Ard Biesheuvel
On Fri, 18 Jan 2019 at 08:06, Wang, Jian J  wrote:
>
>
>
> Reviewed-by: Jian J Wang 
>

Chao, Jiewen, do you have any objections to this patch?

>
> > -Original Message-
> > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> > Sent: Thursday, January 17, 2019 5:22 AM
> > To: edk2-devel@lists.01.org
> > Cc: Ard Biesheuvel ; Kinney, Michael D
> > ; Gao, Liming ; Ye, Ting
> > ; Wei, Gang ; Wang, Jian J
> > ; Zhang, Chao B ; Yao,
> > Jiewen ; Wu, Hao A ; Zeng, Star
> > ; Achin Gupta ; Jagadeesh Ujja
> > 
> > Subject: [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: permit use by
> > MM_STANDALONE modules
> >
> > Add MM_STANDALONE to the list of module types that are permitted to
> > link to this library. Also, since the constructor prototype is
> > different between MM_STANDALONE and DXE_DRIVER type libraries,
> > convert the library into BASE type.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Ard Biesheuvel 
> > ---
> >  SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c   | 9 
> > +-
> > ---
> >  SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf | 4 
> > ++--
> >  2 files changed, 7 insertions(+), 6 deletions(-)
> >
> > diff --git 
> > a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> > b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> > index 0c6ded22f3e6..b2493a029393 100644
> > --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> > +++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> > @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY
> > KIND, EITHER EXPRESS OR IMPLIED.
> >
> >  **/
> >
> > +#include 
> > +
> >  BOOLEAN   mUserPhysicalPresence  = FALSE;
> >
> >  /**
> > @@ -53,15 +55,14 @@ UserPhysicalPresent (
> >@retval  EFI_SUCCESS  PcdUserPhysicalPresence is got 
> > successfully.
> >
> >  **/
> > -EFI_STATUS
> > +RETURN_STATUS
> >  EFIAPI
> >  PlatformSecureLibNullConstructor (
> > -  IN EFI_HANDLEImageHandle,
> > -  IN EFI_SYSTEM_TABLE  *SystemTable
> > +  VOID
> >)
> >  {
> >
> >mUserPhysicalPresence = PcdGetBool(PcdUserPhysicalPresence);
> >
> > -  return EFI_SUCCESS;
> > +  return RETURN_SUCCESS;
> >  }
> > diff --git 
> > a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> > b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> > index 979a33705de0..70051a27a0a9 100644
> > --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> > +++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> > @@ -21,9 +21,9 @@ [Defines]
> >BASE_NAME  = PlatformSecureLibNull
> >MODULE_UNI_FILE= PlatformSecureLibNull.uni
> >FILE_GUID  = 7FA68D82-10A4-4e71-9524-D3D9500D3CDF
> > -  MODULE_TYPE= DXE_DRIVER
> > +  MODULE_TYPE= BASE
> >VERSION_STRING = 1.0
> > -  LIBRARY_CLASS  = PlatformSecureLib|DXE_RUNTIME_DRIVER
> > DXE_SMM_DRIVER DXE_DRIVER
> > +  LIBRARY_CLASS  = PlatformSecureLib|DXE_RUNTIME_DRIVER
> > DXE_SMM_DRIVER DXE_DRIVER MM_STANDALONE
> >CONSTRUCTOR= PlatformSecureLibNullConstructor
> >
> >  #
> > --
> > 2.17.1
>
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: permit use by MM_STANDALONE modules

2019-01-17 Thread Wang, Jian J



Reviewed-by: Jian J Wang 


> -Original Message-
> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> Sent: Thursday, January 17, 2019 5:22 AM
> To: edk2-devel@lists.01.org
> Cc: Ard Biesheuvel ; Kinney, Michael D
> ; Gao, Liming ; Ye, Ting
> ; Wei, Gang ; Wang, Jian J
> ; Zhang, Chao B ; Yao,
> Jiewen ; Wu, Hao A ; Zeng, Star
> ; Achin Gupta ; Jagadeesh Ujja
> 
> Subject: [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: permit use by
> MM_STANDALONE modules
> 
> Add MM_STANDALONE to the list of module types that are permitted to
> link to this library. Also, since the constructor prototype is
> different between MM_STANDALONE and DXE_DRIVER type libraries,
> convert the library into BASE type.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel 
> ---
>  SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c   | 9 
> +-
> ---
>  SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf | 4 ++--
>  2 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> index 0c6ded22f3e6..b2493a029393 100644
> --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> +++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY
> KIND, EITHER EXPRESS OR IMPLIED.
> 
>  **/
> 
> +#include 
> +
>  BOOLEAN   mUserPhysicalPresence  = FALSE;
> 
>  /**
> @@ -53,15 +55,14 @@ UserPhysicalPresent (
>@retval  EFI_SUCCESS  PcdUserPhysicalPresence is got successfully.
> 
>  **/
> -EFI_STATUS
> +RETURN_STATUS
>  EFIAPI
>  PlatformSecureLibNullConstructor (
> -  IN EFI_HANDLEImageHandle,
> -  IN EFI_SYSTEM_TABLE  *SystemTable
> +  VOID
>)
>  {
> 
>mUserPhysicalPresence = PcdGetBool(PcdUserPhysicalPresence);
> 
> -  return EFI_SUCCESS;
> +  return RETURN_SUCCESS;
>  }
> diff --git 
> a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> index 979a33705de0..70051a27a0a9 100644
> --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> +++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> @@ -21,9 +21,9 @@ [Defines]
>BASE_NAME  = PlatformSecureLibNull
>MODULE_UNI_FILE= PlatformSecureLibNull.uni
>FILE_GUID  = 7FA68D82-10A4-4e71-9524-D3D9500D3CDF
> -  MODULE_TYPE= DXE_DRIVER
> +  MODULE_TYPE= BASE
>VERSION_STRING = 1.0
> -  LIBRARY_CLASS  = PlatformSecureLib|DXE_RUNTIME_DRIVER
> DXE_SMM_DRIVER DXE_DRIVER
> +  LIBRARY_CLASS  = PlatformSecureLib|DXE_RUNTIME_DRIVER
> DXE_SMM_DRIVER DXE_DRIVER MM_STANDALONE
>CONSTRUCTOR= PlatformSecureLibNullConstructor
> 
>  #
> --
> 2.17.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: permit use by MM_STANDALONE modules

2019-01-16 Thread Ard Biesheuvel
Add MM_STANDALONE to the list of module types that are permitted to
link to this library. Also, since the constructor prototype is
different between MM_STANDALONE and DXE_DRIVER type libraries,
convert the library into BASE type.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel 
---
 SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c   | 9 
+
 SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf | 4 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c 
b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
index 0c6ded22f3e6..b2493a029393 100644
--- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
+++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 
 **/
 
+#include 
+
 BOOLEAN   mUserPhysicalPresence  = FALSE;
 
 /**
@@ -53,15 +55,14 @@ UserPhysicalPresent (
   @retval  EFI_SUCCESS  PcdUserPhysicalPresence is got successfully.
 
 **/
-EFI_STATUS
+RETURN_STATUS
 EFIAPI
 PlatformSecureLibNullConstructor (
-  IN EFI_HANDLEImageHandle,
-  IN EFI_SYSTEM_TABLE  *SystemTable
+  VOID
   )
 {
 
   mUserPhysicalPresence = PcdGetBool(PcdUserPhysicalPresence);
 
-  return EFI_SUCCESS;
+  return RETURN_SUCCESS;
 }
diff --git 
a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf 
b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
index 979a33705de0..70051a27a0a9 100644
--- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
+++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
@@ -21,9 +21,9 @@ [Defines]
   BASE_NAME  = PlatformSecureLibNull
   MODULE_UNI_FILE= PlatformSecureLibNull.uni
   FILE_GUID  = 7FA68D82-10A4-4e71-9524-D3D9500D3CDF
-  MODULE_TYPE= DXE_DRIVER
+  MODULE_TYPE= BASE
   VERSION_STRING = 1.0
-  LIBRARY_CLASS  = PlatformSecureLib|DXE_RUNTIME_DRIVER 
DXE_SMM_DRIVER DXE_DRIVER
+  LIBRARY_CLASS  = PlatformSecureLib|DXE_RUNTIME_DRIVER 
DXE_SMM_DRIVER DXE_DRIVER MM_STANDALONE
   CONSTRUCTOR= PlatformSecureLibNullConstructor
 
 #
-- 
2.17.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel