From: Konrad Rzeszutek Wilk Date: Sun, 7 Jan 2018 05:17:15 +0000 (-0500) Subject: kpti: Disable when running under Xen PV X-Git-Tag: v4.1.12-124.31.3~1299 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7bd5f6122113ffa9b26d0df4c5a19bd429ad7181;p=users%2Fjedix%2Flinux-maple.git kpti: Disable when running under Xen PV 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 Signed-off-by: Kirtikar Kashyap --- diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c index 74eb971ea911..e978ae1c2a27 100644 --- a/arch/x86/mm/kaiser.c +++ b/arch/x86/mm/kaiser.c @@ -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))