From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::241; helo=mail-it0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2D6CF20352A8C for ; Mon, 4 Dec 2017 12:28:24 -0800 (PST) Received: by mail-it0-x241.google.com with SMTP id f143so9853001itb.0 for ; Mon, 04 Dec 2017 12:32:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=a26wKBljvQnKjTmk9SZxALDHa+quMXBM9MNTFq1OPq4=; b=bgSiX6ZFR14CmbMkyF2iD+EWBrkxR1OWATwobrEDllZZ4MX1cbAe6vZ5ekdUCJ0Jnf YpwIQkPsAAMBgGEdTokOyNEspwybkwytkXt+Y3kmSUoVJKmf5ljUsOOTivr0V01kirA1 2/VDmaTD0L1Y74cEuPgMY9b6pThEfulaNkIUA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=a26wKBljvQnKjTmk9SZxALDHa+quMXBM9MNTFq1OPq4=; b=XL+DqV2xtc3T8OPsrLaeWsxRaFFuGcvk11ZOsSrCg3tBcYpoDk+RpLOeIeW2XlSdau A9huMZVcDqeuQ3vqReVKoREu4v6izT2GikgGeWwEmXO6mDe10Z4YoMVTz1Ytq8BgXvpY kl5c/ioxnBZkfd1o8CxdsQV60Dn/UMDr4PvELwWIEJ6RWJRKmUuNwECvNjZi/DOdM6Dg YsUKkCkKKW8R39dPNG14vJDL7UpS+gKs6taNSK6HCeyQ6RcBxdEilcL030VwpPJ3IhqG SUeu7UgU3wAVud/UjgblDEVrq6z5rH86FtZARub7tn84sTPA3ol5oCariSh2+c+zAYuB /pdg== X-Gm-Message-State: AJaThX4rhtZvAULF1rE8zp077Yl/4CRbmRk1Xr6maQmVTPZMZgYLQxC2 XWM9NyYZrxzJUlvH8xDZ7AuhLIfiVmgo50WZGgzEMw== X-Google-Smtp-Source: AGs4zMZ5dDFaDw4Ws2AAwTc5eZ2hmtoDaB127G0JzaKa8HkqrehsX3anFu9EJ6mL3+Y8Fii4sTDrmknZV8+3dtuIy+0= X-Received: by 10.107.59.85 with SMTP id i82mr25002092ioa.253.1512419574346; Mon, 04 Dec 2017 12:32:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.104.16 with HTTP; Mon, 4 Dec 2017 12:32:53 -0800 (PST) In-Reply-To: <20171204194743.15245-1-lersek@redhat.com> References: <20171204194743.15245-1-lersek@redhat.com> From: Ard Biesheuvel Date: Mon, 4 Dec 2017 20:32:53 +0000 Message-ID: To: Laszlo Ersek Cc: edk2-devel-01 , Eric Dong , Jiewen Yao , Liming Gao , Star Zeng 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: Mon, 04 Dec 2017 20:28:25 -0000 Content-Type: text/plain; charset="UTF-8" On 4 December 2017 at 19:47, Laszlo Ersek 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 > Cc: Eric Dong > Cc: Jiewen Yao > Cc: Liming Gao > Cc: Star Zeng > Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1520485 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Laszlo Ersek Acked-by: Ard Biesheuvel > --- > 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 >