]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
x86/IBRS: Save current status of MSR_IA32_SPEC_CTRL
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Mon, 8 Jan 2018 23:30:50 +0000 (18:30 -0500)
committerKirtikar Kashyap <kirtikar.kashyap@oracle.com>
Fri, 12 Jan 2018 18:20:14 +0000 (10:20 -0800)
... otherwise we are restoring garbage and the MSR only allows
writes to two lower bits, causing a #GPF is other bits are set

While at it, also stuff RSB, which we typically do before enabling
IBRS

Orabug: 27365419

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
arch/x86/kernel/entry_64.S

index d52ec3c33b41e3d53e397a0c98a96dc1f1026edc..ed037398a2ad468403ecbc01dee082494b112a8f 100644 (file)
@@ -1996,6 +1996,8 @@ end_repeat_nmi:
        DEFAULT_FRAME 0                         /* XXX: Do we need this? */
 
        /* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */
+       STUFF_RSB
+       ENABLE_IBRS_SAVE_AND_CLOBBER save_reg=%r13d
        call do_nmi
        RESTORE_IBRS_CLOBBER save_reg=%r13d
 #ifdef CONFIG_PAGE_TABLE_ISOLATION