From: Catalin Marinas <catalin.marinas@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v6 4/4] arm64: Use a variable to store non-global mappings decision
Date: Wed, 6 Nov 2019 10:24:28 +0000 [thread overview]
Message-ID: <20191106102428.GE21133@arrakis.emea.arm.com> (raw)
In-Reply-To: <20191105214854.30725-5-broonie@kernel.org>
On Tue, Nov 05, 2019 at 09:48:54PM +0000, Mark Brown wrote:
> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
> index 60c929f3683b..8462a358a1dc 100644
> --- a/arch/arm64/mm/mmu.c
> +++ b/arch/arm64/mm/mmu.c
> @@ -679,6 +679,13 @@ void __init paging_init(void)
> cpu_replace_ttbr1(lm_alias(swapper_pg_dir));
> init_mm.pgd = swapper_pg_dir;
>
> + /*
> + * If know now we are going to need KPTI then use non-global
> + * mappings from the start, avoiding the cost of rewriting
> + * everything later.
> + */
> + arm64_use_ng_mappings = kaslr_requires_kpti();
This really needs to be done before map_kernel() and map_mem() in
paging_init(). Tested this series and most of the linear map does not
have the nG bit when it should (/sys/kernel/debug/kernel_page_tables).
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-11-06 10:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 21:48 [PATCH v6 0/4] E0PD support Mark Brown
2019-11-05 21:48 ` [PATCH v6 1/4] arm64: Add initial support for E0PD Mark Brown
2019-11-05 21:48 ` [PATCH v6 2/4] arm64: Factor out checks for KASLR in KPTI code into separate function Mark Brown
2019-11-05 21:48 ` [PATCH v6 3/4] arm64: Don't use KPTI where we have E0PD Mark Brown
2019-11-05 21:48 ` [PATCH v6 4/4] arm64: Use a variable to store non-global mappings decision Mark Brown
2019-11-06 10:24 ` Catalin Marinas [this message]
2019-11-06 12:12 ` Mark Brown
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=20191106102428.GE21133@arrakis.emea.arm.com \
--to=catalin.marinas@arm.com \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=will@kernel.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).