]> 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>
Thu, 28 May 2020 20:13:55 +0000 (16:13 -0400)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 18 Jun 2020 13:47:03 +0000 (15:47 +0200)
commitf86cbc276c054e0c8ec5f3b61eb205fe79dc778e
treedd8db560ea94d2a7df4478b2abade4f266a5fd49
parentc966e9322d221388140dea04acb3c11663a76396
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/1557309753-24073-11-git-send-email-chang.seok.bae@intel.com
Link: https://lkml.kernel.org/r/20200528201402.1708239-10-sashal@kernel.org
arch/x86/entry/entry_64.S