Skip to contentSkip to conversation

Xen missing prompt log when exec-sp=off

PATCH Superseded Jin Nan Wang 2 participants 3 messages Dec 16, 2019

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Xen missing prompt log when exec-sp=off

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

---
 xen/arch/x86/hvm/vmx/vmx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
xen/arch/x86/hvm/vmx/vmx.c +3 -1
index 7970ba93e1..9c1f0f645d 100644
@@ -2499,7 +2499,9 @@ const struct hvm_function_table * __init start_vmx(void)
         {
             /* Default to non-executable superpages on vulnerable hardware. */
             opt_ept_exec_sp = !cpu_has_bug_pschange_mc;
-
+        }
+        if (opt_ept_exec_sp == false)
+        {
             if ( cpu_has_bug_pschange_mc )
                 printk("VMX: Disabling executable EPT superpages due to CVE-2018-12207\n");
         }
Signature · 7 lines
2.24.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw
Quoted 16 lines

From: Jin Nan Wang <[email protected]>
Sent: Monday, December 16, 2019 1:48 PM

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

---
 xen/arch/x86/hvm/vmx/vmx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
xen/arch/x86/hvm/vmx/vmx.c +0 -0
index 7970ba93e1..9c1f0f645d 100644

xen/arch/x86/hvm/vmx/vmx.c const struct hvm_function_table * __init · line 2503

Quoted 6 lines
xen/arch/x86/hvm/vmx/vmx.c +1 -1
@@ -2499,7 +2499,9 @@ const struct hvm_function_table * __init
 start_vmx(void)
         {
             /* Default to non-executable superpages on vulnerable hardware. */
             opt_ept_exec_sp = !cpu_has_bug_pschange_mc;
-
+        }

no parenthesis then. Just move the comment before the earlier condition check

Quoted 6 lines
xen/arch/x86/hvm/vmx/vmx.c +2 -0
+        if (opt_ept_exec_sp == false)
+        {
             if ( cpu_has_bug_pschange_mc )
                 printk("VMX: Disabling executable EPT superpages due to CVE-
2018-12207\n");
         }

Can we do it another way? Always throw out a warning if the hardware is vulnerable, plus its enabling status?

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
Quoted 11 lines · Kevin
Quoted 11 lines

From: Jin Nan Wang <[email protected]>
Sent: Monday, December 16, 2019 1:48 PM

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

---
  xen/arch/x86/hvm/vmx/vmx.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 13 lines

xen/arch/x86/hvm/vmx/vmx.c const struct hvm_function_table * __init · line 2503

Quoted 11 lines
xen/arch/x86/hvm/vmx/vmx.c +1 -1
index 7970ba93e1..9c1f0f645d 100644
@@ -2499,7 +2499,9 @@ const struct hvm_function_table * __init
 start_vmx(void)
          {
              /* Default to non-executable superpages on vulnerable hardware. */
              opt_ept_exec_sp = !cpu_has_bug_pschange_mc;
-
+        }

no parenthesis then. Just move the comment before the earlier condition check

Got it.

Quoted 8 lines
Quoted 6 lines
xen/arch/x86/hvm/vmx/vmx.c +2 -0
+        if (opt_ept_exec_sp == false)
+        {
              if ( cpu_has_bug_pschange_mc )
                  printk("VMX: Disabling executable EPT superpages due to CVE-
2018-12207\n");
          }

Can we do it another way? Always throw out a warning if the hardware is vulnerable, plus its enabling status?

OK. Let me try.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel