From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9BE1820356240 for ; Mon, 4 Dec 2017 18:56:29 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2017 19:00:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,362,1508828400"; d="scan'208";a="1251952884" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 04 Dec 2017 19:00:58 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 4 Dec 2017 19:00:57 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 4 Dec 2017 19:00:57 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.175]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Tue, 5 Dec 2017 11:00:56 +0800 From: "Zeng, Star" To: Laszlo Ersek , edk2-devel-01 CC: Ard Biesheuvel , "Dong, Eric" , "Yao, Jiewen" , "Gao, Liming" , "Zeng, Star" Thread-Topic: [PATCH] MdeModulePkg/Core/Dxe: log informative memprotect msgs at DEBUG_INFO level Thread-Index: AQHTbTjJiSq7rZIQDkCvo4yY8SOcD6M0D/8g Date: Tue, 5 Dec 2017 03:00:55 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B9BF7B1@shsmsx102.ccr.corp.intel.com> References: <20171204194743.15245-1-lersek@redhat.com> In-Reply-To: <20171204194743.15245-1-lersek@redhat.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/Core/Dxe: log informative memprotect msgs at DEBUG_INFO level X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 02:56:29 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng -----Original Message----- From: Laszlo Ersek [mailto:lersek@redhat.com]=20 Sent: Tuesday, December 5, 2017 3:48 AM To: edk2-devel-01 Cc: Ard Biesheuvel ; Dong, Eric ; Yao, Jiewen ; Gao, Liming ; Zeng, Star 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=20 > active memory regions and > InitializeDxeNxMemoryProtectionPolicy: applying strict permissions to=20 > inactive memory regions The messages don't report errors or warnings, thus downgrade their log mask= s from DEBUG_ERROR to DEBUG_INFO. Cc: Ard Biesheuvel Cc: Eric Dong Cc: Jiewen Yao Cc: Liming Gao Cc: Star Zeng Ref: https://bugzilla.redhat.com/show_bug.cgi?id=3D1520485 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- 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/C= ore/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 =3D=3D EFI_BUFFER_TOO_SMALL); ASSERT_EFI_ERROR (Status); =20 - DEBUG((DEBUG_ERROR, "%a: applying strict permissions to active memory re= gions\n", - __FUNCTION__)); + DEBUG (( + DEBUG_INFO, + "%a: applying strict permissions to active memory regions\n", + __FUNCTION__ + )); =20 MergeMemoryMapForProtectionPolicy (MemoryMap, &MemoryMapSize, Descriptor= Size); =20 @@ -856,9 +859,11 @@ InitializeDxeNxMemoryProtectionPolicy ( // accessible, but have not been added to the UEFI memory map (yet). // if (GetPermissionAttributeForMemoryType (EfiConventionalMemory) !=3D 0) = { - DEBUG((DEBUG_ERROR, + DEBUG (( + DEBUG_INFO, "%a: applying strict permissions to inactive memory regions\n", - __FUNCTION__)); + __FUNCTION__ + )); =20 CoreAcquireGcdMemoryLock (); =20 -- 2.14.1.3.gb7cf6e02401b