aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/microcode/amd.c
diff options
context:
space:
mode:
authorJoerg Roedel <[email protected]>2018-08-31 10:05:38 +0200
committerThomas Gleixner <[email protected]>2018-08-31 17:45:54 +0200
commiteeb89e2bb1ac45b0836d4170e97a988c3a746c62 (patch)
tree4bbdbe94fac1d57965293198cb345324d4b89a1d /arch/x86/kernel/cpu/microcode/amd.c
parent4012e77a903d114f915fc607d6d2ed54a3d6c9b1 (diff)
x86/efi: Load fixmap GDT in efi_call_phys_epilog()
When PTI is enabled on x86-32 the kernel uses the GDT mapped in the fixmap for the simple reason that this address is also mapped for user-space. The efi_call_phys_prolog()/efi_call_phys_epilog() wrappers change the GDT to call EFI runtime services and switch back to the kernel GDT when they return. But the switch-back uses the writable GDT, not the fixmap GDT. When that happened and and the CPU returns to user-space it switches to the user %cr3 and tries to restore user segment registers. This fails because the writable GDT is not mapped in the user page-table, and without a GDT the fault handlers also can't be launched. The result is a triple fault and reboot of the machine. Fix that by restoring the GDT back to the fixmap GDT which is also mapped in the user page-table. Fixes: 7757d607c6b3 x86/pti: ('Allow CONFIG_PAGE_TABLE_ISOLATION for x86_32') Reported-by: Guenter Roeck <[email protected]> Signed-off-by: Joerg Roedel <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Guenter Roeck <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Pavel Machek <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'arch/x86/kernel/cpu/microcode/amd.c')
0 files changed, 0 insertions, 0 deletions