From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] arm64: ptdump: include UEFI runtime service mappings
Date: Mon, 22 Feb 2016 11:00:39 +0100 [thread overview]
Message-ID: <1456135239-3607-4-git-send-email-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <1456135239-3607-1-git-send-email-ard.biesheuvel@linaro.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 <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
arch/arm64/mm/dump.c | 8 ++++++++
drivers/firmware/efi/arm-runtime.c | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
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),
--
2.5.0
next prev parent reply other threads:[~2016-02-22 10:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 10:00 [PATCH 0/3] arm64 pt dumper changes Ard Biesheuvel
2016-02-22 10:00 ` [PATCH 1/3] arm64: ptdump: use static initializers for vmemmap region boundaries Ard Biesheuvel
2016-02-22 11:33 ` Mark Rutland
2016-02-22 19:37 ` Laura Abbott
2016-02-22 10:00 ` [PATCH 2/3] arm64: ptdump: add region marker for kasan shadow region Ard Biesheuvel
2016-02-22 11:33 ` Mark Rutland
2016-02-22 10:00 ` Ard Biesheuvel [this message]
2016-02-22 11:29 ` [PATCH 3/3] arm64: ptdump: include UEFI runtime service mappings Mark Rutland
2016-02-22 11:51 ` Ard Biesheuvel
2016-02-22 19:04 ` Kees Cook
2016-04-22 14:11 ` [PATCH 0/3] arm64 pt dumper changes Catalin Marinas
2016-04-22 14:15 ` Ard Biesheuvel
2016-04-22 14:25 ` Mark Rutland
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-all 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=1456135239-3607-4-git-send-email-ard.biesheuvel@linaro.org \
--to=ard.biesheuvel@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).