]> git.baikalelectronics.ru Git - kernel.git/commit
x86/entry/64: Switch CR3 before SWAPGS in paranoid entry
authorChang S. Bae <chang.seok.bae@intel.com>
Wed, 8 May 2019 10:02:25 +0000 (03:02 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 22 Jun 2019 09:38:53 +0000 (11:38 +0200)
commit623bc219a1eea3fe798e32c19e49f06bca6bb7b5
treeec25267a630ca152af3d1a476793e25ebd77d960
parent631d933b7f9a6d0606af39441eff98bfd94df6b5
x86/entry/64: Switch CR3 before SWAPGS in paranoid entry

When FSGSBASE is enabled, the GSBASE handling in paranoid entry will need
to retrieve the kernel GSBASE which requires that the kernel page table is
active.

As the CR3 switch to the kernel page tables (PTI is active) does not depend
on kernel GSBASE, move the CR3 switch in front of the GSBASE handling.

Comment the EBX content while at it.

No functional change.

[ tglx: Rewrote changelog and comments ]

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ravi Shankar <ravi.v.shankar@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Link: https://lkml.kernel.org/r/1557309753-24073-11-git-send-email-chang.seok.bae@intel.com
arch/x86/entry/entry_64.S