]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
kpti: Disable when running under Xen PV
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Sun, 7 Jan 2018 05:17:15 +0000 (00:17 -0500)
committerKirtikar Kashyap <kirtikar.kashyap@oracle.com>
Fri, 12 Jan 2018 18:20:12 +0000 (10:20 -0800)
Very very partial backport from aa8c6248f8c75 where
there is a check to see if this is an Xen PV guest - and
if so disable it.

The reason is that the PV ABI would require a major
overhaul to be Meltdown resistent.

Instead there are mitigations (PV in HVM) which are far more
suitable.

Orabug: 27333760
CVE: CVE-2017-5754

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
arch/x86/mm/kaiser.c

index 74eb971ea9114fa53e7496a57ebf03369551b5b5..e978ae1c2a2758323d6f611bad937a4432804e20 100644 (file)
@@ -267,6 +267,9 @@ void __init kaiser_check_boottime_disable(void)
        char arg[5];
        int ret;
 
+       if (xen_pv_domain())
+               goto disable;
+
        ret = cmdline_find_option(boot_command_line, "pti", arg, sizeof(arg));
        if (ret > 0) {
                if (!strncmp(arg, "on", 2))