]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
kaiser: delete KAISER_REAL_SWITCH option
authorHugh Dickins <hughd@google.com>
Mon, 4 Sep 2017 01:30:43 +0000 (18:30 -0700)
committerKirtikar Kashyap <kirtikar.kashyap@oracle.com>
Fri, 12 Jan 2018 18:20:07 +0000 (10:20 -0800)
We fail to see what CONFIG_KAISER_REAL_SWITCH is for: it seems to be
left over from early development, and now just obscures tricky parts
of the code.  Delete it before adding PCIDs, or nokaiser boot option.

(Or if there is some good reason to keep the option, then it needs
a help text - and a "depends on KAISER", so that all those without
KAISER are not asked the question.)

Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b9d2ccc54e17b5aa50dd0c036d3f4fb4e5248d54)
Orabug: 27333760
CVE: CVE-2017-5754
Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Conflicts:
arch/x86/entry/entry_64.S (not in this tree)
arch/x86/kernel/entry_64.S (patched instead of that)

Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
arch/x86/include/asm/kaiser.h
arch/x86/kernel/entry_64.S
security/Kconfig

index 051acf678cda3761c893ddc501b46ea3c93801a9..e0fc45e77aeeb4bab9d88f624a365f459498ca06 100644 (file)
 
 .macro _SWITCH_TO_KERNEL_CR3 reg
 movq %cr3, \reg
-#ifdef CONFIG_KAISER_REAL_SWITCH
 andq $(~KAISER_SHADOW_PGD_OFFSET), \reg
-#endif
 movq \reg, %cr3
 .endm
 
 .macro _SWITCH_TO_USER_CR3 reg
 movq %cr3, \reg
-#ifdef CONFIG_KAISER_REAL_SWITCH
 orq $(KAISER_SHADOW_PGD_OFFSET), \reg
-#endif
 movq \reg, %cr3
 .endm
 
index d8227679b586c32484c757db2f6a14f8d0bc2a6d..00c4fe48285c4934db3d483558d5715fa314427f 100644 (file)
@@ -1724,9 +1724,7 @@ ENTRY(nmi)
        /* %rax is saved above, so OK to clobber here */
        movq    %cr3, %rax
        pushq   %rax
-#ifdef CONFIG_KAISER_REAL_SWITCH
        andq    $(~KAISER_SHADOW_PGD_OFFSET), %rax
-#endif
        movq    %rax, %cr3
 #endif
        call    do_nmi
@@ -1962,9 +1960,7 @@ end_repeat_nmi:
        /* %rax is saved above, so OK to clobber here */
        movq    %cr3, %rax
        pushq   %rax
-#ifdef CONFIG_KAISER_REAL_SWITCH
        andq    $(~KAISER_SHADOW_PGD_OFFSET), %rax
-#endif
        movq    %rax, %cr3
 #endif
        DEFAULT_FRAME 0                         /* XXX: Do we need this? */
index 4e1c5e966835339db9129688ae5c2401c44872d9..3d36fd094439ffbe73065d80acb0b4cbc499d500 100644 (file)
@@ -41,10 +41,6 @@ config KAISER
 
          If you are unsure how to answer this question, answer Y.
 
-config KAISER_REAL_SWITCH
-       bool "KAISER: actually switch page tables"
-       default y
-
 config SECURITYFS
        bool "Enable the securityfs filesystem"
        help