From: "Malgorzata Kukiello" <jacek.kukiello@intel.com>
To: devel@edk2.groups.io
Cc: Malgorzata Kukiello <jacek.kukiello@intel.com>,
Jian J Wang <jian.j.wang@intel.com>,
Hao A Wu <hao.a.wu@intel.com>, Dandan Bi <dandan.bi@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Oleksiy Yakovlev <oleksiyy@ami.com>,
Ard Biesheuvel <ard.biesheuvel@arm.com>
Subject: [PATCH v2 2/2] MdeModulePkg/Core/Dxe: expose SP and CRYPTO capabilities in UEFI memmap
Date: Thu, 24 Sep 2020 12:21:31 +0200 [thread overview]
Message-ID: <20200924102132.18248-2-jacek.kukiello@intel.com> (raw)
In-Reply-To: <20200924102132.18248-1-jacek.kukiello@intel.com>
OSs are now capable of treating SP and CRYPTO memory as true capabilities
and therefore these should be exposed. This requires usage of a separate
ACCESS_MASK to hide all page-access permission capabilities.
Change in masking and hiding of SP and CRYPTO was introduced in
3bd5c994c879f78e8e3d5346dc3b627f199291aa
Signed-off-by: Malgorzata Kukiello <jacek.kukiello@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Oleksiy Yakovlev <oleksiyy@ami.com>
Cc: Ard Biesheuvel (ARM address) <ard.biesheuvel@arm.com>
---
MdeModulePkg/Core/Dxe/Mem/Page.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c
index 2c2c9cd6c3..731bf08bc9 100644
--- a/MdeModulePkg/Core/Dxe/Mem/Page.c
+++ b/MdeModulePkg/Core/Dxe/Mem/Page.c
@@ -1924,16 +1924,16 @@ CoreGetMemoryMap (
// set attributes and change memory paging attribute accordingly.
// But current EFI_MEMORY_DESCRIPTOR.Attribute is assigned by
// value from Capabilities in GCD memory map. This might cause
- // boot problems. Clearing all paging related capabilities can
- // workaround it. Following code is supposed to be removed once
- // the usage of EFI_MEMORY_DESCRIPTOR.Attribute is clarified in
- // UEFI spec and adopted by both EDK-II Core and all supported
- // OSs.
+ // boot problems. Clearing all page-access permission related
+ // capabilities can workaround it. Following code is supposed to
+ // be removed once the usage of EFI_MEMORY_DESCRIPTOR.Attribute
+ // is clarified in UEFI spec and adopted by both EDK-II Core and
+ // all supported OSs.
//
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.
next prev parent reply other threads:[~2020-09-24 10:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-24 10:21 [PATCH v2 0/2] UEFI memmap workaround for hiding page-access caps from OSes hides SP and CRYPTO caps too jacek.kukiello
2020-09-24 10:21 ` Malgorzata Kukiello [this message]
2020-09-24 10:21 ` [PATCH v2 1/2] MdePkg/UefiSpec: separate page access bitmask from SP and CRYPTO caps Malgorzata Kukiello
2020-09-24 13:04 ` [edk2-devel] [PATCH v2 0/2] UEFI memmap workaround for hiding page-access caps from OSes hides SP and CRYPTO caps too Laszlo Ersek
2020-09-25 8:54 ` 回复: " gaoliming
2020-09-28 15:39 ` Malgorzata Kukiello
2020-09-29 1:13 ` 回复: " gaoliming
2020-10-02 12:52 ` Malgorzata Kukiello
[not found] ` <163A2DF5FC986A3A.27356@groups.io>
2020-10-09 6:01 ` Malgorzata Kukiello
2020-10-09 9:30 ` 回复: " gaoliming
[not found] ` <163C48FE4529CC02.8231@groups.io>
2020-10-10 3:35 ` gaoliming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200924102132.18248-2-jacek.kukiello@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox