]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/mm: Fix PTI for i386 some more
authorThomas Gleixner <tglx@linutronix.de>
Tue, 6 Aug 2024 18:48:43 +0000 (20:48 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 7 Aug 2024 13:35:01 +0000 (15:35 +0200)
commitc48b5a4cf3125adb679e28ef093f66ff81368d05
treeec112fd4825d3743d81b429d6a0984d4c82e8536
parentde9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed
x86/mm: Fix PTI for i386 some more

So it turns out that we have to do two passes of
pti_clone_entry_text(), once before initcalls, such that device and
late initcalls can use user-mode-helper / modprobe and once after
free_initmem() / mark_readonly().

Now obviously mark_readonly() can cause PMD splits, and
pti_clone_pgtable() doesn't like that much.

Allow the late clone to split PMDs so that pagetables stay in sync.

[peterz: Changelog and comments]
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lkml.kernel.org/r/20240806184843.GX37996@noisy.programming.kicks-ass.net
arch/x86/mm/pti.c