From 7bd5f6122113ffa9b26d0df4c5a19bd429ad7181 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Sun, 7 Jan 2018 00:17:15 -0500 Subject: [PATCH] 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 --- arch/x86/mm/kaiser.c | 3 +++ 1 file changed, 3 insertions(+) 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)) -- 2.50.1