alistair23-linux/arch
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
..
alpha Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2017-09-11 18:34:47 -07:00
arc mm: treewide: remove GFP_TEMPORARY allocation flag 2017-09-13 18:53:16 -07:00
arm The diff is dominated by the Allwinner A10/A20 SoCs getting converted to 2017-09-13 11:04:14 -07:00
arm64 arm64: stacktrace: avoid listing stacktrace functions in stacktrace 2017-09-13 18:53:16 -07:00
blackfin Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2017-09-11 18:34:47 -07:00
c6x c6x: Convert to using %pOF instead of full_name 2017-08-24 09:35:40 -04:00
cris MTD changes for 4.14: 2017-09-09 14:48:21 -07:00
frv Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2017-09-11 18:34:47 -07:00
h8300 arch: define CPU_BIG_ENDIAN for all fixed big endian archs 2017-09-08 18:26:48 -07:00
hexagon Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 11:52:29 -07:00
ia64 Merge branch 'work.ipc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-09-14 17:37:26 -07:00
m32r m32r: defconfig: cleanup from old Kconfig options 2017-09-08 18:26:51 -07:00
m68k Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2017-09-10 21:07:39 -07:00
metag dma-mapping updates for 4.14: 2017-09-12 13:30:06 -07:00
microblaze Merge branch 'akpm' (patches from Andrew) 2017-09-09 10:30:07 -07:00
mips Merge branch '4.14-features' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2017-09-15 20:43:33 -07:00
mn10300 mn10300: defconfig: cleanup from old Kconfig options 2017-09-08 18:26:51 -07:00
nios2 nios2 update for v4.14-rc1 2017-09-15 12:47:21 -07:00
openrisc OpenRISC patches for 4.14 2017-09-13 11:52:18 -07:00
parisc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2017-09-11 18:34:47 -07:00
powerpc * PPC bugfixes 2017-09-15 15:43:55 -07:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-09-12 06:01:59 -07:00
score
sh dma-mapping updates for 4.14: 2017-09-12 13:30:06 -07:00
sparc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2017-09-11 18:34:47 -07:00
tile dma-mapping updates for 4.14: 2017-09-12 13:30:06 -07:00
um Merge branch 'for-linus-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2017-09-16 12:03:25 -07:00
unicore32 unicore32/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks 2017-08-03 16:29:34 -05:00
x86 x86/mm/32: Load a sane CR3 before cpu_init() on secondary CPUs 2017-09-17 18:59:09 +02:00
xtensa Merge branch 'akpm' (patches from Andrew) 2017-09-06 20:49:49 -07:00
.gitignore
Kconfig - For the randstruct plugin, enable automatic randomization of structures 2017-09-07 20:30:19 -07:00