[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v4] Xen missing prompt log when exec-sp=off


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jin Nan Wang <jnwang@xxxxxxxx>
  • Date: Mon, 16 Dec 2019 12:11:01 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iEMoEYSj0bfFmSSEcDY6zPpRGtK000+/NYonGTTZXeQ=; b=l2O5Dypw9kedHLer3uzEZb+q2J6ZN71FPURqUx5ij1PusqDlHqQm6LXX6gzcsl7LHOyHqRn9pcL6K8RnPai8zSCCwHlwT4OPzrQuwFsUSVp8SYzdhd5y90d4AC1/n5SICkhEjnnoLkZLNmV9j81YPoLx3lREtDYLce4/1AAYJoiPI3xZ82rP7px3g+C0yrN1/f1vtL1QU+ngc5I8ilgpp4ZQrrn7HCMmc1iAjCWFtiA8CG9UGinK3e6KQjgRI9ykUPw0ARIscwSlcqv+rBpxF3V3beeQuOfrVW7thmtgi3ZHFRUXYvvBmL+XOooF38mwTM7Pv2RPPWY0BCXmcPX/rQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R49sTPcPoeeOTTBxaQUWk0YIj8kORlVo8F5XsNH/1V1os5DtlkuPJr5eBUg29xTrglwXdLxdwt7ZYGNovnlp3PKjabGxztRBXOeJjvX0iEbw/Icfdp+83L7+c3keDpff/piOCjDD3YaukXc4HS7LIDPnpuFNXBPATOOqpvMSY+21nERPQJ2ifghX4JiZz0GfV90CvD7H7rKsGdPqjMfJoiRkM+f8kle0yyklJNFHJaMsCIwpmAa01zvyrfMNzutbzsFTnCKM9Iq5YvEN0hnQi7hXhGdT1fgY1rUO6p3YREI3QI8gAZKMG3Vo7VxnYPLd93YlQRJ4JbAvCVkMBpQ84g==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=jnwang@xxxxxxxx;
  • Cc: Kevin Tian <kevin.tian@xxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jin Nan Wang <jnwang@xxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 16 Dec 2019 12:30:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVtAnikBKl2+3ElEG70BBPpmH8nw==
  • Thread-topic: [PATCH v4] Xen missing prompt log when exec-sp=off

Fix a issue when user disable ETP exec-sp, xen missed a prompt
log in dmesg.

At default, xen will tell "VMX: Disabling executable EPT suerpages
due to CVE-2018-12207". When user add 'ept=exec-sp=off' on command-line.
The prompt is disappeared. This can give users the illusion that the
feature is turned on.

Signed-off-by: James Wang <jnwang@xxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 7970ba93e1..9dcb100210 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2495,14 +2495,14 @@ const struct hvm_function_table * __init start_vmx(void)
     {
         bool cpu_has_bug_pschange_mc = has_if_pschange_mc();
 
+        /* Default to non-executable superpages on vulnerable hardware. */
         if ( opt_ept_exec_sp == -1 )
-        {
-            /* Default to non-executable superpages on vulnerable hardware. */
             opt_ept_exec_sp = !cpu_has_bug_pschange_mc;
 
-            if ( cpu_has_bug_pschange_mc )
-                printk("VMX: Disabling executable EPT superpages due to 
CVE-2018-12207\n");
-        }
+        if ( opt_ept_exec_sp )
+            printk("VMX: Enable executable EPT superpages\n");
+        else 
+            printk("VMX: Disabling executable EPT superpages due to 
CVE-2018-12207\n");
 
         vmx_function_table.hap_supported = 1;
         vmx_function_table.altp2m_supported = 1;
-- 
2.24.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.