lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aO71TX//mL3QOV3T@intel.com>
Date: Wed, 15 Oct 2025 09:13:49 +0800
From: Chao Gao <chao.gao@...el.com>
To: Sean Christopherson <seanjc@...gle.com>
CC: Paolo Bonzini <pbonzini@...hat.com>, <kvm@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, Kai Huang <kai.huang@...el.com>, Xiaoyao Li
	<xiaoyao.li@...el.com>, Rick Edgecombe <rick.p.edgecombe@...el.com>
Subject: Re: [PATCH] KVM: VMX: Inject #UD if guest tries to execute SEAMCALL
 or TDCALL

>--- a/arch/x86/kvm/vmx/nested.c
>+++ b/arch/x86/kvm/vmx/nested.c
>@@ -6728,6 +6728,14 @@ static bool nested_vmx_l1_wants_exit(struct kvm_vcpu *vcpu,
> 	case EXIT_REASON_NOTIFY:
> 		/* Notify VM exit is not exposed to L1 */
> 		return false;
>+	case EXIT_REASON_SEAMCALL:
>+	case EXIT_REASON_TDCALL:
>+		/*
>+		 * SEAMCALL and TDCALL unconditionally VM-Exit, but aren't
>+		 * virtualized by KVM for L1 hypervisors, i.e. L1 should
>+		 * never want or expect such an exit.
>+		 */
>+		return true;
> 	default:
> 		return true;
> 	}
>diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c
>index 097304bf1e1d..7326c68f9909 100644
>--- a/arch/x86/kvm/vmx/tdx.c
>+++ b/arch/x86/kvm/vmx/tdx.c
>@@ -2127,6 +2127,9 @@ int tdx_handle_exit(struct kvm_vcpu *vcpu, fastpath_t fastpath)
> 		return tdx_emulate_mmio(vcpu);
> 	case EXIT_REASON_EPT_VIOLATION:
> 		return tdx_handle_ept_violation(vcpu);
>+	case EXIT_REASON_SEAMCALL:
>+		kvm_queue_exception(vcpu, UD_VECTOR);

Emm, the host cannot inject exceptions to TDX guests. Right?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ