alistair23-linux/arch/x86
Andy Lutomirski 4ba55e65f4 x86/mm/32: Load a sane CR3 before cpu_init() on secondary CPUs
For unknown historical reasons (i.e. Borislav doesn't recall),
32-bit kernels invoke cpu_init() on secondary CPUs with
initial_page_table loaded into CR3.  Then they set
current->active_mm to &init_mm and call enter_lazy_tlb() before
fixing CR3.  This means that the x86 TLB code gets invoked while CR3
is inconsistent, and, with the improved PCID sanity checks I added,
we warn.

Fix it by loading swapper_pg_dir (i.e. init_mm.pgd) earlier.

Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Borislav Petkov <bpetkov@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 72c0098d92 ("x86/mm: Reinitialize TLB state on hotplug and resume")
Link: http://lkml.kernel.org/r/30cdfea504682ba3b9012e77717800a91c22097f.1505663533.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-09-17 18:59:09 +02:00
..
boot Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-07 09:42:35 -07:00
configs
crypto
entry Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 17:43:56 -07:00
events Merge branch 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 13:56:37 -07:00
hyperv tracing/hyper-v: Trace hyperv_mmu_flush_tlb_others() 2017-08-31 14:20:37 +02:00
ia32 Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-09-14 18:13:32 -07:00
include x86/mm/64: Stop using CR3.PCID == 0 in ASID-aware code 2017-09-17 18:59:08 +02:00
kernel x86/mm/32: Load a sane CR3 before cpu_init() on secondary CPUs 2017-09-17 18:59:09 +02:00
kvm * PPC bugfixes 2017-09-15 15:43:55 -07:00
lib
math-emu Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 17:43:56 -07:00
mm x86/mm: Factor out CR3-building code 2017-09-17 18:59:08 +02:00
net x86: bpf_jit: small optimization in emit_bpf_tail_call() 2017-08-31 11:57:37 -07:00
oprofile
pci dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
platform Merge branch 'i2c/for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2017-09-09 14:18:40 -07:00
power dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
purgatory
ras
realmode
tools
um um: remove a stray tab 2017-09-13 22:36:27 +02:00
video
xen x86/paravirt: Remove no longer used paravirt functions 2017-09-13 10:55:15 +02:00
.gitignore
Kbuild Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-07 09:25:15 -07:00
Kconfig libnvdimm for 4.14 2017-09-11 13:10:57 -07:00
Kconfig.cpu
Kconfig.debug
Makefile
Makefile.um
Makefile_32.cpu