From nobody Mon Nov 25 22:54:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65567+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65567+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1600951990; cv=none; d=zohomail.com; s=zohoarc; b=IIFoLq9T6sokeomx9r2Z3Sx4gqLNEM0paWXu76A6OAcOdoipx6/H8M5DxgfOrFcC88imLnAHo0WOUkQ8Kmo2Ei2JROjyuh5hVNiyJmJcrvgyHl+9Y60ChyS+RchUm0m1AAb/4dp7r9o25OCbRgZ4azz7ucfYTzJywsMNTgYF830= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600951990; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=oj068EExLNN9kiq+QT32PZoKV5o81glfys525U5EFUg=; b=l78tMj74mAZU0ceXk/Z/MYT300LMU6RHj9do59QSCd3vjQ2t/TnmRO89r4oeoAvtJpHqiytB21kDKAljBYwOfU5onyGOVZZP9bgD11rBzO9T7JvmcyXT6Sk0OoIVEMl9lydk06iL1ERis7OzokuqF2f1Efjx656CLPNdrB75dfg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65567+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 160095199009580.7086622740087; Thu, 24 Sep 2020 05:53:10 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id zjbAYY1788612xR6kJkEq8cq; Thu, 24 Sep 2020 05:53:09 -0700 X-Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.13647.1600942973425380349 for ; Thu, 24 Sep 2020 03:22:53 -0700 IronPort-SDR: Q/KLEYnRf0E4twlDEq3KH7W2j1QznUyvrhvCP9NbDYj4Nbvwbr6E8s6dR//AjCUp9UsA25y3N+ EvELo4P2/SAQ== X-IronPort-AV: E=McAfee;i="6000,8403,9753"; a="179235840" X-IronPort-AV: E=Sophos;i="5.77,297,1596524400"; d="scan'208";a="179235840" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2020 03:22:52 -0700 IronPort-SDR: 5jOdf+JvKCRdFAPAxPl20ei5TkV49oNffMgdHO0EN2XrbCscYj+wI5oStPyaGi6+A0ThQWoPAX h+iySVVEvW4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,297,1596524400"; d="scan'208";a="338996261" X-Received: from jkukiell-desk.ger.corp.intel.com ([10.102.87.26]) by orsmga008.jf.intel.com with ESMTP; 24 Sep 2020 03:22:50 -0700 From: "Malgorzata Kukiello" To: devel@edk2.groups.io Cc: Malgorzata Kukiello , Jian J Wang , Hao A Wu , Dandan Bi , Liming Gao , Oleksiy Yakovlev , Ard Biesheuvel Subject: [edk2-devel] [PATCH v2 2/2] MdeModulePkg/Core/Dxe: expose SP and CRYPTO capabilities in UEFI memmap Date: Thu, 24 Sep 2020 12:21:31 +0200 Message-Id: <20200924102132.18248-2-jacek.kukiello@intel.com> In-Reply-To: <20200924102132.18248-1-jacek.kukiello@intel.com> References: <20200924102132.18248-1-jacek.kukiello@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jacek.kukiello@intel.com X-Gm-Message-State: fMVqGLpsuaqmHRm0ZdNxGu9Gx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1600951989; bh=zcp1dLLgT7qGDDT1hf3is5OKkIBzfrDaZeD0nX44iNE=; h=Cc:Date:From:Reply-To:Subject:To; b=MIzhPjsizg/VRMdAIBGUNPyQmhz+f2GlheBFsTRgkVreshfC5QU4ys2wchpAHtQpaYY ptDAdXYsHPFdgoeN9gXp9XCRcPduHcmxOZEa/sthLYjDoZqV5wXPAM3MY+Fj7r2Peh6Qo Iv8wTnUNshUrQx3vDliM3AcVPXr+CbH9W+Q= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=20 3bd5c994c879f78e8e3d5346dc3b627f199291aa Signed-off-by: Malgorzata Kukiello Cc: Jian J Wang Cc: Hao A Wu Cc: Dandan Bi Cc: Liming Gao Cc: Oleksiy Yakovlev Cc: Ard Biesheuvel (ARM address) --- 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/P= age.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 =3D MemoryMap; MemoryMap =3D MemoryMapStart; while (MemoryMap < MemoryMapEnd) { - MemoryMap->Attribute &=3D ~(UINT64)EFI_MEMORY_ATTRIBUTE_MASK; + MemoryMap->Attribute &=3D ~(UINT64)EFI_MEMORY_ACCESS_MASK; MemoryMap =3D NEXT_MEMORY_DESCRIPTOR (MemoryMap, Size); } MergeMemoryMap (MemoryMapStart, &BufferSize, Size); --=20 2.18.0.windows.1 --------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Sowackiego 173 | 80-298 Gdask | Sd Rejonowy Gdask Pnoc | VII Wydzia Gos= podarczy Krajowego Rejestru Sdowego - KRS 101882 | NIP 957-07-52-316 | Kapi= ta zakadowy 200.000 PLN. Ta wiadomo wraz z zacznikami jest przeznaczona dla okrelonego adresata i mo= e zawiera informacje poufne. W razie przypadkowego otrzymania tej wiadomoci= , prosimy o powiadomienie nadawcy oraz trwae jej usunicie; jakiekolwiek prz= egldanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the s= ole use of the intended recipient(s). If you are not the intended recipient= , please contact the sender and delete all copies; any review or distributi= on by others is strictly prohibited. =20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65567): https://edk2.groups.io/g/devel/message/65567 Mute This Topic: https://groups.io/mt/77056341/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-