@@ -7926,7 +7926,9 @@
emulate Vsyscalls turn into traps and are emulated
reasonably safely. The vsyscall page is
- readable.
+ readable. This disables the Linear
+ Address Space Separation (LASS) security
+ feature and makes the system less secure.
xonly [default] Vsyscalls turn into traps and are
emulated reasonably safely. The vsyscall
@@ -36,6 +36,7 @@
#include <asm/vsyscall.h>
#include <asm/unistd.h>
#include <asm/fixmap.h>
+#include <asm/tlbflush.h>
#include <asm/traps.h>
#include <asm/paravirt.h>
@@ -63,6 +64,13 @@ static int __init vsyscall_setup(char *str)
else
return -EINVAL;
+ if (cpu_feature_enabled(X86_FEATURE_LASS) &&
+ vsyscall_mode == EMULATE) {
+ cr4_clear_bits(X86_CR4_LASS);
+ setup_clear_cpu_cap(X86_FEATURE_LASS);
+ pr_warn_once("x86/cpu: Disabling LASS support due to vsyscall=emulate\n");
+ }
+
return 0;
}