From patchwork Mon Feb 22 10:00:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 62550 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1131455lbl; Mon, 22 Feb 2016 02:03:25 -0800 (PST) X-Received: by 10.67.1.209 with SMTP id bi17mr37069718pad.150.1456135403808; Mon, 22 Feb 2016 02:03:23 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id fk7si38766559pac.50.2016.02.22.02.03.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Feb 2016 02:03:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aXnJy-0008DR-Uu; Mon, 22 Feb 2016 10:02:26 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aXnIn-00070c-Dg for linux-arm-kernel@lists.infradead.org; Mon, 22 Feb 2016 10:01:16 +0000 Received: by mail-wm0-x22e.google.com with SMTP id g62so149223071wme.0 for ; Mon, 22 Feb 2016 02:00:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1SD7768TchxeybV9HiaQ3dSCvfjpT8RHiKd6eIkcg2U=; b=Ohs3BcXztDpfH7fENwEHFCr8NyCSFoiloY5hDPTL+ztbQhZdJJTiFl1j7zPWEF/5OQ 5MV/BZQ5D1tDWMLkZn6AKGq3tWukyMzHMfPllx5tLD/9O+yMUe1KP7tN2+xGeO24oLU0 4tsclsG3I4gshfxwJ31ReWTImU18uHnhQ6z2I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1SD7768TchxeybV9HiaQ3dSCvfjpT8RHiKd6eIkcg2U=; b=jsNlKaoCTg5KTRSOFy/SI8NEKNDMWI490MdFMbx7F98N6UUl154TY+hSomj+nPDZhO eeNoHpMPnzg3Y+dbh3lMySlv7DfOOFGxW/ZKrJCvfti7JIwFQDk4ipbsEBp0UtnEs4Hh ZG+9XjDVuXOx33G+da4VJCjgBJTySzyZz78/CT0kgFA/PO+E24jGCek43jXzCnQcB+4P Twbr996mh0u8ZI6AUPOy8Xo58SJMcIxP9qBnYNR4Jk8capNXNz9wq/GjrgZoOf9cYXla 9icS6K9VBynDLmuWwWGmNIMp9Py+0eHXoESRoPMK+lRPCpGKhFRfPZUAUrud72ewe1CB BB9w== X-Gm-Message-State: AG10YOTDb2N+AnOUsdlE8HiqxyXqNVtI5LSahV+O9t4ZCVPBIlXJZOz4wa9K1zy6cBEkyGZr X-Received: by 10.28.158.8 with SMTP id h8mr11532307wme.6.1456135251813; Mon, 22 Feb 2016 02:00:51 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id e194sm20449019wma.19.2016.02.22.02.00.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Feb 2016 02:00:51 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, keescook@chromium.org, catalin.marinas@arm.com Subject: [PATCH 3/3] arm64: ptdump: include UEFI runtime service mappings Date: Mon, 22 Feb 2016 11:00:39 +0100 Message-Id: <1456135239-3607-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1456135239-3607-1-git-send-email-ard.biesheuvel@linaro.org> References: <1456135239-3607-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160222_020113_903198_86463157 X-CRM114-Status: GOOD ( 12.58 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: matt@codeblueprint.co.uk, Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org This adds the UEFI runtime services page table mappings to the output of the kernel page table dumper. These tables are only live during the time UEFI runtime services are being invoked, but we can include them for informational purposes nonetheless. Cc: Matt Fleming Signed-off-by: Ard Biesheuvel --- arch/arm64/mm/dump.c | 8 ++++++++ drivers/firmware/efi/arm-runtime.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/mm/dump.c b/arch/arm64/mm/dump.c index 12e4b1732303..e7b937c9ad52 100644 --- a/arch/arm64/mm/dump.c +++ b/arch/arm64/mm/dump.c @@ -36,6 +36,10 @@ struct addr_marker { }; static struct addr_marker address_markers[] = { +#ifdef CONFIG_EFI + { 0, "UEFI runtime start" }, + { TASK_SIZE_64, "UEFI runtime end" }, +#endif #ifdef CONFIG_KASAN { KASAN_SHADOW_START, "Kasan shadow start" }, { KASAN_SHADOW_END, "Kasan shadow end" }, @@ -310,6 +314,10 @@ static int ptdump_show(struct seq_file *m, void *v) .marker = address_markers, }; + if (IS_ENABLED(CONFIG_EFI)) { + extern struct mm_struct efi_mm; + walk_pgd(&st, &efi_mm, 0); + } walk_pgd(&st, &init_mm, LOWEST_ADDR); note_page(&st, 0, 0, 0); diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c index 6ae21e41a429..3a3911641049 100644 --- a/drivers/firmware/efi/arm-runtime.c +++ b/drivers/firmware/efi/arm-runtime.c @@ -30,7 +30,7 @@ extern u64 efi_system_table; -static struct mm_struct efi_mm = { +struct mm_struct efi_mm = { .mm_rb = RB_ROOT, .mm_users = ATOMIC_INIT(2), .mm_count = ATOMIC_INIT(1),