public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg/Core/Dxe: log informative memprotect msgs at DEBUG_INFO level
@ 2017-12-04 19:47 Laszlo Ersek
  2017-12-04 20:32 ` Ard Biesheuvel
  2017-12-05  3:00 ` Zeng, Star
  0 siblings, 2 replies; 4+ messages in thread
From: Laszlo Ersek @ 2017-12-04 19:47 UTC (permalink / raw)
  To: edk2-devel-01
  Cc: Ard Biesheuvel, Eric Dong, Jiewen Yao, Liming Gao, Star Zeng

In commit 7eb927db3e25 ("MdeModulePkg/DxeCore: implement memory protection
policy", 2017-02-24), we added two informative messages with the
InitializeDxeNxMemoryProtectionPolicy() function:

> InitializeDxeNxMemoryProtectionPolicy: applying strict permissions to
> active memory regions

and

> InitializeDxeNxMemoryProtectionPolicy: applying strict permissions to
> inactive memory regions

The messages don't report errors or warnings, thus downgrade their log
masks from DEBUG_ERROR to DEBUG_INFO.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1520485
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
index 21a52d0af55a..a74cfc137a22 100644
--- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
+++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
@@ -831,8 +831,11 @@ InitializeDxeNxMemoryProtectionPolicy (
   } while (Status == EFI_BUFFER_TOO_SMALL);
   ASSERT_EFI_ERROR (Status);
 
-  DEBUG((DEBUG_ERROR, "%a: applying strict permissions to active memory regions\n",
-    __FUNCTION__));
+  DEBUG ((
+    DEBUG_INFO,
+    "%a: applying strict permissions to active memory regions\n",
+    __FUNCTION__
+    ));
 
   MergeMemoryMapForProtectionPolicy (MemoryMap, &MemoryMapSize, DescriptorSize);
 
@@ -856,9 +859,11 @@ InitializeDxeNxMemoryProtectionPolicy (
   // accessible, but have not been added to the UEFI memory map (yet).
   //
   if (GetPermissionAttributeForMemoryType (EfiConventionalMemory) != 0) {
-    DEBUG((DEBUG_ERROR,
+    DEBUG ((
+      DEBUG_INFO,
       "%a: applying strict permissions to inactive memory regions\n",
-      __FUNCTION__));
+      __FUNCTION__
+      ));
 
     CoreAcquireGcdMemoryLock ();
 
-- 
2.14.1.3.gb7cf6e02401b



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

* Re: [PATCH] MdeModulePkg/Core/Dxe: log informative memprotect msgs at DEBUG_INFO level
  2017-12-04 19:47 [PATCH] MdeModulePkg/Core/Dxe: log informative memprotect msgs at DEBUG_INFO level Laszlo Ersek
@ 2017-12-04 20:32 ` Ard Biesheuvel
  2017-12-05  3:00 ` Zeng, Star
  1 sibling, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2017-12-04 20:32 UTC (permalink / raw)
  To: Laszlo Ersek; +Cc: edk2-devel-01, Eric Dong, Jiewen Yao, Liming Gao, Star Zeng

On 4 December 2017 at 19:47, Laszlo Ersek <lersek@redhat.com> wrote:
> In commit 7eb927db3e25 ("MdeModulePkg/DxeCore: implement memory protection
> policy", 2017-02-24), we added two informative messages with the
> InitializeDxeNxMemoryProtectionPolicy() function:
>
>> InitializeDxeNxMemoryProtectionPolicy: applying strict permissions to
>> active memory regions
>
> and
>
>> InitializeDxeNxMemoryProtectionPolicy: applying strict permissions to
>> inactive memory regions
>
> The messages don't report errors or warnings, thus downgrade their log
> masks from DEBUG_ERROR to DEBUG_INFO.
>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1520485
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>

Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---
>  MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
> index 21a52d0af55a..a74cfc137a22 100644
> --- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
> +++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
> @@ -831,8 +831,11 @@ InitializeDxeNxMemoryProtectionPolicy (
>    } while (Status == EFI_BUFFER_TOO_SMALL);
>    ASSERT_EFI_ERROR (Status);
>
> -  DEBUG((DEBUG_ERROR, "%a: applying strict permissions to active memory regions\n",
> -    __FUNCTION__));
> +  DEBUG ((
> +    DEBUG_INFO,
> +    "%a: applying strict permissions to active memory regions\n",
> +    __FUNCTION__
> +    ));
>
>    MergeMemoryMapForProtectionPolicy (MemoryMap, &MemoryMapSize, DescriptorSize);
>
> @@ -856,9 +859,11 @@ InitializeDxeNxMemoryProtectionPolicy (
>    // accessible, but have not been added to the UEFI memory map (yet).
>    //
>    if (GetPermissionAttributeForMemoryType (EfiConventionalMemory) != 0) {
> -    DEBUG((DEBUG_ERROR,
> +    DEBUG ((
> +      DEBUG_INFO,
>        "%a: applying strict permissions to inactive memory regions\n",
> -      __FUNCTION__));
> +      __FUNCTION__
> +      ));
>
>      CoreAcquireGcdMemoryLock ();
>
> --
> 2.14.1.3.gb7cf6e02401b
>


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

* Re: [PATCH] MdeModulePkg/Core/Dxe: log informative memprotect msgs at DEBUG_INFO level
  2017-12-04 19:47 [PATCH] MdeModulePkg/Core/Dxe: log informative memprotect msgs at DEBUG_INFO level Laszlo Ersek
  2017-12-04 20:32 ` Ard Biesheuvel
@ 2017-12-05  3:00 ` Zeng, Star
  2017-12-05 18:01   ` Laszlo Ersek
  1 sibling, 1 reply; 4+ messages in thread
From: Zeng, Star @ 2017-12-05  3:00 UTC (permalink / raw)
  To: Laszlo Ersek, edk2-devel-01
  Cc: Ard Biesheuvel, Dong, Eric, Yao, Jiewen, Gao, Liming, Zeng, Star

Reviewed-by: Star Zeng <star.zeng@intel.com>

-----Original Message-----
From: Laszlo Ersek [mailto:lersek@redhat.com] 
Sent: Tuesday, December 5, 2017 3:48 AM
To: edk2-devel-01 <edk2-devel@lists.01.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Dong, Eric <eric.dong@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Gao, Liming <liming.gao@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: [PATCH] MdeModulePkg/Core/Dxe: log informative memprotect msgs at DEBUG_INFO level

In commit 7eb927db3e25 ("MdeModulePkg/DxeCore: implement memory protection policy", 2017-02-24), we added two informative messages with the
InitializeDxeNxMemoryProtectionPolicy() function:

> InitializeDxeNxMemoryProtectionPolicy: applying strict permissions to 
> active memory regions

and

> InitializeDxeNxMemoryProtectionPolicy: applying strict permissions to 
> inactive memory regions

The messages don't report errors or warnings, thus downgrade their log masks from DEBUG_ERROR to DEBUG_INFO.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1520485
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
index 21a52d0af55a..a74cfc137a22 100644
--- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
+++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
@@ -831,8 +831,11 @@ InitializeDxeNxMemoryProtectionPolicy (
   } while (Status == EFI_BUFFER_TOO_SMALL);
   ASSERT_EFI_ERROR (Status);
 
-  DEBUG((DEBUG_ERROR, "%a: applying strict permissions to active memory regions\n",
-    __FUNCTION__));
+  DEBUG ((
+    DEBUG_INFO,
+    "%a: applying strict permissions to active memory regions\n",
+    __FUNCTION__
+    ));
 
   MergeMemoryMapForProtectionPolicy (MemoryMap, &MemoryMapSize, DescriptorSize);
 
@@ -856,9 +859,11 @@ InitializeDxeNxMemoryProtectionPolicy (
   // accessible, but have not been added to the UEFI memory map (yet).
   //
   if (GetPermissionAttributeForMemoryType (EfiConventionalMemory) != 0) {
-    DEBUG((DEBUG_ERROR,
+    DEBUG ((
+      DEBUG_INFO,
       "%a: applying strict permissions to inactive memory regions\n",
-      __FUNCTION__));
+      __FUNCTION__
+      ));
 
     CoreAcquireGcdMemoryLock ();
 
--
2.14.1.3.gb7cf6e02401b



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

* Re: [PATCH] MdeModulePkg/Core/Dxe: log informative memprotect msgs at DEBUG_INFO level
  2017-12-05  3:00 ` Zeng, Star
@ 2017-12-05 18:01   ` Laszlo Ersek
  0 siblings, 0 replies; 4+ messages in thread
From: Laszlo Ersek @ 2017-12-05 18:01 UTC (permalink / raw)
  To: Zeng, Star, Ard Biesheuvel
  Cc: edk2-devel-01, Yao, Jiewen, Dong, Eric, Gao, Liming

On 12/05/17 04:00, Zeng, Star wrote:
> Reviewed-by: Star Zeng <star.zeng@intel.com>

Thank you both; commit a921228818b5.

Laszlo

> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com] 
> Sent: Tuesday, December 5, 2017 3:48 AM
> To: edk2-devel-01 <edk2-devel@lists.01.org>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Dong, Eric <eric.dong@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Gao, Liming <liming.gao@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: [PATCH] MdeModulePkg/Core/Dxe: log informative memprotect msgs at DEBUG_INFO level
> 
> In commit 7eb927db3e25 ("MdeModulePkg/DxeCore: implement memory protection policy", 2017-02-24), we added two informative messages with the
> InitializeDxeNxMemoryProtectionPolicy() function:
> 
>> InitializeDxeNxMemoryProtectionPolicy: applying strict permissions to 
>> active memory regions
> 
> and
> 
>> InitializeDxeNxMemoryProtectionPolicy: applying strict permissions to 
>> inactive memory regions
> 
> The messages don't report errors or warnings, thus downgrade their log masks from DEBUG_ERROR to DEBUG_INFO.
> 
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1520485
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>  MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
> index 21a52d0af55a..a74cfc137a22 100644
> --- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
> +++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
> @@ -831,8 +831,11 @@ InitializeDxeNxMemoryProtectionPolicy (
>    } while (Status == EFI_BUFFER_TOO_SMALL);
>    ASSERT_EFI_ERROR (Status);
>  
> -  DEBUG((DEBUG_ERROR, "%a: applying strict permissions to active memory regions\n",
> -    __FUNCTION__));
> +  DEBUG ((
> +    DEBUG_INFO,
> +    "%a: applying strict permissions to active memory regions\n",
> +    __FUNCTION__
> +    ));
>  
>    MergeMemoryMapForProtectionPolicy (MemoryMap, &MemoryMapSize, DescriptorSize);
>  
> @@ -856,9 +859,11 @@ InitializeDxeNxMemoryProtectionPolicy (
>    // accessible, but have not been added to the UEFI memory map (yet).
>    //
>    if (GetPermissionAttributeForMemoryType (EfiConventionalMemory) != 0) {
> -    DEBUG((DEBUG_ERROR,
> +    DEBUG ((
> +      DEBUG_INFO,
>        "%a: applying strict permissions to inactive memory regions\n",
> -      __FUNCTION__));
> +      __FUNCTION__
> +      ));
>  
>      CoreAcquireGcdMemoryLock ();
>  
> --
> 2.14.1.3.gb7cf6e02401b
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> 



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

end of thread, other threads:[~2017-12-05 17:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-04 19:47 [PATCH] MdeModulePkg/Core/Dxe: log informative memprotect msgs at DEBUG_INFO level Laszlo Ersek
2017-12-04 20:32 ` Ard Biesheuvel
2017-12-05  3:00 ` Zeng, Star
2017-12-05 18:01   ` Laszlo Ersek

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