From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web11.16304.1600952662730056490 for ; Thu, 24 Sep 2020 06:04:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iV6nM41P; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600952662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TmHWeBnj9reGqev2eNK8Fi4VSEuANRSPnPmexlnEbHs=; b=iV6nM41PceWBANP+wCkX7Rj74X6M+fEuhrnwTWR6RrzHBQ+3sDid7PR61plOjbmCcC43Ic zIaOeJn2000UUbfuCL5oqLW9L0b/VjlcpRbFrkjQk8k4ybYwLBNqn3+PN3TR9v0mA5UTmF RhswmPz5m+hTYJDQ8gRAcS8pDVnSu4E= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-362-tL4W8URvO8qvOLwIQWCJkA-1; Thu, 24 Sep 2020 09:04:10 -0400 X-MC-Unique: tL4W8URvO8qvOLwIQWCJkA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4653664146; Thu, 24 Sep 2020 13:04:08 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-35.ams2.redhat.com [10.36.114.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id BEDDF10013C1; Thu, 24 Sep 2020 13:04:05 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 0/2] UEFI memmap workaround for hiding page-access caps from OSes hides SP and CRYPTO caps too To: devel@edk2.groups.io, jacek.kukiello@intel.com Cc: Michael D Kinney , Jian J Wang , Hao A Wu , Dandan Bi , Liming Gao , Zhiguang Liu , Oleksiy Yakovlev , Ard Biesheuvel References: <20200924102132.18248-1-jacek.kukiello@intel.com> From: "Laszlo Ersek" Message-ID: Date: Thu, 24 Sep 2020 15:04:04 +0200 MIME-Version: 1.0 In-Reply-To: <20200924102132.18248-1-jacek.kukiello@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 09/24/20 12:21, Malgorzata Kukiello wrote: > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2982 > > The workaround in the UEFI memmap construction, near the end of the > function CoreGetMemoryMap() [MdeModulePkg/Core/Dxe/Mem/Page.c] should > not clear the SP and CRYPTO bits, because OSes do (apparently) correctly > interpret SP and CRYPTO as capabilities, and not as currently set > attributes (upon which the OSes should set their page tables). For this > reason, the SP and CRYPTO bits should be separated from the bitmask that > we use for hiding the page-access attributes, in the workaround > > Signed-off-by: Malgorzata Kukiello > Cc: Michael D Kinney > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Dandan Bi > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Oleksiy Yakovlev > Cc: Ard Biesheuvel (ARM address) > > MdeModulePkg/Core/Dxe/Mem/Page.c | 12 ++++++------ > MdePkg/Include/Uefi/UefiSpec.h | 3 ++- > 2 files changed, 8 insertions(+), 7 deletions(-) series Reviewed-by: Laszlo Ersek