From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5FAC482201 for ; Mon, 20 Feb 2017 23:36:19 -0800 (PST) Received: by mail-it0-x229.google.com with SMTP id k200so30910503itb.1 for ; Mon, 20 Feb 2017 23:36:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=U5wtyhBCKWF3wOpDJ5OcbZWGx4Dlvs5FPmv/p9cKMaw=; b=HMshopYWsTkTdFwV5v3XmnBozJ88L8/RxNzFW6/XM9iUnyKnMdhn/gfyzXncKlTjIX WXXo+1blSD/79RsG8yvBclrXm5MFxhFc9xFzf7GKB1m2+NjgNIhPQwUKdrq30jnc7ext yLh0GIsG0B6c+libugsv8LIsstXYmELiE1QME= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=U5wtyhBCKWF3wOpDJ5OcbZWGx4Dlvs5FPmv/p9cKMaw=; b=b8WuiXXHc+u02Tz4H0ynUh9tUsDuWmzaQqVDxJClpMq9zz92yl8+fJzp2fOHx8eVOv PiFyn2jFrKOplqKZcHHaV27nKTZFGU01v8vBfOxlxIYF0DT0J63BErfrRacvBVoWfUaE 4OfDrcbaWZE0/2Om5eS5Q140g27dJ+yF5YZsN3vrI+V4gBnpLNJLenGU/e75zpv6ySHD jCSKJXwKeXGsXpU1fBE918C4IjwoSXlvq066jeW6H/QvHNi9NYoC1DDwbCuPx2MfumW6 udHy3JjIvfch+kFIMbIlMR16xC5DfXJtCBmo8bYGg1QDhJHznR0DHqeD4oqwzau4jMzo c9Ww== X-Gm-Message-State: AMke39l3ntts8DXpEU0XrX4BJQILURbWALA5av+Gc+okxbyA4CSAWl+F/1ilmZ+LrrDxVkDugeyVjDzPvluN6Tb9 X-Received: by 10.107.11.92 with SMTP id v89mr18638611ioi.138.1487662578653; Mon, 20 Feb 2017 23:36:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.198.134 with HTTP; Mon, 20 Feb 2017 23:36:18 -0800 (PST) In-Reply-To: <1487178716-24569-1-git-send-email-ard.biesheuvel@linaro.org> References: <1487178716-24569-1-git-send-email-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Tue, 21 Feb 2017 07:36:18 +0000 Message-ID: To: "edk2-devel@lists.01.org" , Leif Lindholm Cc: "Yao, Jiewen" , Ard Biesheuvel Subject: Re: [PATCH v2 0/4] ArmPkg: add groundwork for DXE image protection X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2017 07:36:19 -0000 Content-Type: text/plain; charset=UTF-8 Hi Leif, On 15 February 2017 at 17:11, Ard Biesheuvel wrote: > The upcoming DXE image protection feature expects the EFI_CPU_ARCH_PROTOCOL > method SetMemoryAttributes() to deal with invocations that only modify > permission attributes, but leave the cacheability attributes alone. This > requires some groundwork to be performed in the MMU code for ARM. > > Patch #1 is Jiewen's patch to retire EFI_MEMORY_WP, which is no longer > used as a permission attribute. > > Patch #2 updates EfiAttributeToArmAttribute () so it can deal with > unspecified caching modes. > > Patch #3 makes ARM deal with EFI_CPU_ARCH_PROTOCOL.SetMemoryAttributes() > calls that do not specify memory attributes. On ARM, we don't have code > that manages the permission bits in the page tables, so this does little > more than ignore such attributes. > > Patch #4 implements the handling for AARCH64 to manage the permissions > bits without touching or caring about the memory type attributes. > > Changes since v1: > - add Leif's and my R-b to #1 > - add Leif's R-b to #3 > - fix reference to TT_ATTR_INDX_MASK in commit log (#2) > - move rather than redefine EFI_MEMORY_CACHETYPE_MASK macro (#4) > I'm aware that you have been off sick, so I'm sure you have quite the todo list, but could you have a look this, please? Jiewen sent out the next version of the DXE memory protection feature, which looks finished to me, and I'd like to get this in first. Cheers, > Ard Biesheuvel (3): > ArmPkg/CpuDxe: translate invalid memory types in > EfiAttributeToArmAttribute > ArmPkg/CpuDxe: ARM: ignore page table updates that only change > permissions > ArmPkg/ArmMmuLib: AARCH64: add support for modifying only permissions > > Jiewen Yao (1): > ArmPkg/CpuDxe: Correct EFI_MEMORY_RO usage > > ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c | 7 +- > ArmPkg/Drivers/CpuDxe/Arm/Mmu.c | 24 ++--- > ArmPkg/Drivers/CpuDxe/CpuDxe.h | 8 -- > ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c | 5 +- > ArmPkg/Include/Library/ArmLib.h | 4 + > ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c | 94 ++++++++++++++------ > 6 files changed, 88 insertions(+), 54 deletions(-) > > -- > 2.7.4 >