Thread (7 messages) 7 messages, 2 authors, 2019-11-06

Re: [PATCH v6 4/4] arm64: Use a variable to store non-global mappings decision

From: Mark Brown <broonie@kernel.org>
Date: 2019-11-06 12:12:45

On Wed, Nov 06, 2019 at 10:24:28AM +0000, Catalin Marinas wrote:
On Tue, Nov 05, 2019 at 09:48:54PM +0000, Mark Brown wrote:
quoted
+        /*
+         * 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).
Hrm, right.  That was getting hidden in the other noise in the diffs
(I've been mainly checking that I was getting similar page tables
between the various configurations in hetrogenous systems).  It looks
like anywhere paging_init() is too late, the reordering you suggest
still leaves some stray non-global mappings.  I've moved it to the start
of setup_arch() which seems early enough.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help