From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web12.8315.1600848767723648923 for ; Wed, 23 Sep 2020 01:12:48 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: jacek.kukiello@intel.com) IronPort-SDR: tS+jtUJ/TBMmRUVve3TI+pUwzpg+15lpcLIfcHSaQioPcNR7FnqrTi0OkrxNdoUN2UiOR3m8D4 ZXtV7zYV016g== X-IronPort-AV: E=McAfee;i="6000,8403,9752"; a="148485300" X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="148485300" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2020 01:12:45 -0700 IronPort-SDR: vD/teTpXwSVbgnXpux5yE2R3ZCPfZIqjpac7HtYXYTVdgrKbDJSSW0d3sBMlATvYNXviNu7G5P qJS5QLWoJLaQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="338575501" Received: from jkukiell-desk.ger.corp.intel.com ([10.102.87.26]) by orsmga008.jf.intel.com with ESMTP; 23 Sep 2020 01:12:44 -0700 From: Malgorzata Kukiello To: devel@edk2.groups.io Cc: Malgorzata Kukiello Subject: [PATCH] MdeModulePkg/Mem: Memory paging related attributes must be separated from others Date: Wed, 23 Sep 2020 10:08:28 +0200 Message-Id: <20200923080829.6884-1-jacek.kukiello@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2982 During a recent change (bda18f5ed04f5317ab2bdc9da4530c078b33cc63) that changed the way memory attributes are handled it affected a function in Page.c that would clear all memory attributes even security related ones Signed-off-by: Malgorzata Kukiello --- MdeModulePkg/Core/Dxe/Mem/Page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c index 2c2c9cd6c3..9254afb92b 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Page.c +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c @@ -1933,7 +1933,7 @@ CoreGetMemoryMap ( MemoryMapEnd = MemoryMap; MemoryMap = MemoryMapStart; while (MemoryMap < MemoryMapEnd) { - MemoryMap->Attribute &= ~(UINT64)EFI_MEMORY_ATTRIBUTE_MASK; + MemoryMap->Attribute &= ~(UINT64)EFI_MEMORY_ACCESS_MASK; MemoryMap = NEXT_MEMORY_DESCRIPTOR (MemoryMap, Size); } MergeMemoryMap (MemoryMapStart, &BufferSize, Size); -- 2.18.0.windows.1 --------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Sowackiego 173 | 80-298 Gdask | Sd Rejonowy Gdask Pnoc | VII Wydzia Gospodarczy Krajowego Rejestru Sdowego - KRS 101882 | NIP 957-07-52-316 | Kapita zakadowy 200.000 PLN. Ta wiadomo wraz z zacznikami jest przeznaczona dla okrelonego adresata i moe zawiera informacje poufne. W razie przypadkowego otrzymania tej wiadomoci, prosimy o powiadomienie nadawcy oraz trwae jej usunicie; jakiekolwiek przegldanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.