From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] arm64: ptdump: include UEFI runtime service mappings
Date: Mon, 22 Feb 2016 11:29:02 +0000 [thread overview]
Message-ID: <20160222112901.GA3435@leverpostej> (raw)
In-Reply-To: <1456135239-3607-4-git-send-email-ard.biesheuvel@linaro.org>
Hi,
On Mon, Feb 22, 2016 at 11:00:39AM +0100, Ard Biesheuvel wrote:
> 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.
I would prefer that we had a separate file for the EFI runtime services
page tables. As you mention, they are distinct from the kernel and not
always live (which is also the case for the idmap, for example).
I have some local patches atop of v4.3 that librify the dumping code and
add a separate file for EFI [1]. I spotted a couple other things in
doing that (e.g. that we need to pad addresses more).
Is it worth cleaning that up?
Thanks,
Mark.
[1] git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/ptdump/librify
>
> 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
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
next prev parent reply other threads:[~2016-02-22 11:29 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 ` [PATCH 3/3] arm64: ptdump: include UEFI runtime service mappings Ard Biesheuvel
2016-02-22 11:29 ` Mark Rutland [this message]
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=20160222112901.GA3435@leverpostej \
--to=mark.rutland@arm.com \
--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).