Commit d1e6c805 authored by Hugh Dickins's avatar Hugh Dickins Committed by Kleber Sacilotto de Souza

kaiser: delete KAISER_REAL_SWITCH option

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.)
Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

CVE-2017-5754
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent e7ce30c1
...@@ -1291,9 +1291,7 @@ ENTRY(nmi) ...@@ -1291,9 +1291,7 @@ ENTRY(nmi)
/* %rax is saved above, so OK to clobber here */ /* %rax is saved above, so OK to clobber here */
movq %cr3, %rax movq %cr3, %rax
pushq %rax pushq %rax
#ifdef CONFIG_KAISER_REAL_SWITCH
andq $(~KAISER_SHADOW_PGD_OFFSET), %rax andq $(~KAISER_SHADOW_PGD_OFFSET), %rax
#endif
movq %rax, %cr3 movq %rax, %cr3
#endif #endif
call do_nmi call do_nmi
...@@ -1534,9 +1532,7 @@ end_repeat_nmi: ...@@ -1534,9 +1532,7 @@ end_repeat_nmi:
/* %rax is saved above, so OK to clobber here */ /* %rax is saved above, so OK to clobber here */
movq %cr3, %rax movq %cr3, %rax
pushq %rax pushq %rax
#ifdef CONFIG_KAISER_REAL_SWITCH
andq $(~KAISER_SHADOW_PGD_OFFSET), %rax andq $(~KAISER_SHADOW_PGD_OFFSET), %rax
#endif
movq %rax, %cr3 movq %rax, %cr3
#endif #endif
......
...@@ -21,17 +21,13 @@ ...@@ -21,17 +21,13 @@
.macro _SWITCH_TO_KERNEL_CR3 reg .macro _SWITCH_TO_KERNEL_CR3 reg
movq %cr3, \reg movq %cr3, \reg
#ifdef CONFIG_KAISER_REAL_SWITCH
andq $(~KAISER_SHADOW_PGD_OFFSET), \reg andq $(~KAISER_SHADOW_PGD_OFFSET), \reg
#endif
movq \reg, %cr3 movq \reg, %cr3
.endm .endm
.macro _SWITCH_TO_USER_CR3 reg .macro _SWITCH_TO_USER_CR3 reg
movq %cr3, \reg movq %cr3, \reg
#ifdef CONFIG_KAISER_REAL_SWITCH
orq $(KAISER_SHADOW_PGD_OFFSET), \reg orq $(KAISER_SHADOW_PGD_OFFSET), \reg
#endif
movq \reg, %cr3 movq \reg, %cr3
.endm .endm
......
...@@ -41,10 +41,6 @@ config KAISER ...@@ -41,10 +41,6 @@ config KAISER
If you are unsure how to answer this question, answer Y. 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 config SECURITYFS
bool "Enable the securityfs filesystem" bool "Enable the securityfs filesystem"
help help
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment