From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web12.8342.1600848892046718174 for ; Wed, 23 Sep 2020 01:14:52 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: jacek.kukiello@intel.com) IronPort-SDR: LVCIWNzWqwq+oOZ0OFJRohzGVzJ3+terWKfZz7jVG8P/RXuxjqrEenQx62q/AugmckavmQKNjI /cDeeIUfGy/g== X-IronPort-AV: E=McAfee;i="6000,8403,9752"; a="224963318" X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="224963318" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2020 01:14:50 -0700 IronPort-SDR: z5bGVCWiGp3JGDBQu4nYwP/tPxJ4PfEEMkSWSGHLxd59hpaFcOjRm51/JNMFRk/ppbaQCz7+hg flq1mfMr4rsw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="338576178" Received: from jkukiell-desk.ger.corp.intel.com ([10.102.87.26]) by orsmga008.jf.intel.com with ESMTP; 23 Sep 2020 01:14:49 -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:29 +0200 Message-Id: <20200923080829.6884-2-jacek.kukiello@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20200923080829.6884-1-jacek.kukiello@intel.com> References: <20200923080829.6884-1-jacek.kukiello@intel.com> 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 --- MdePkg/Include/Uefi/UefiSpec.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h index 05b82e0be1..2b1b72d862 100644 --- a/MdePkg/Include/Uefi/UefiSpec.h +++ b/MdePkg/Include/Uefi/UefiSpec.h @@ -113,7 +113,8 @@ typedef enum { // Attributes bitmasks, grouped by type // #define EFI_CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) -#define EFI_MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO) +#define EFI_MEMORY_ACCESS_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO) +#define EFI_MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_ACCESS_MASK | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO) /// /// Memory descriptor version number. -- 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.