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: <DS0PR11MB6373FA1820DDC8804BAF6BD6DC5AA@DS0PR11MB6373.namprd11.prod.outlook.com>
Date:   Wed, 14 Jun 2023 11:45:49 +0000
From:   "Wang, Wei W" <wei.w.wang@...el.com>
To:     Isaku Yamahata <isaku.yamahata@...il.com>
CC:     "Yamahata, Isaku" <isaku.yamahata@...el.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        "Aktas, Erdem" <erdemaktas@...gle.com>,
        "Christopherson,, Sean" <seanjc@...gle.com>,
        "Shahar, Sagi" <sagis@...gle.com>,
        David Matlack <dmatlack@...gle.com>,
        "Huang, Kai" <kai.huang@...el.com>,
        Zhi Wang <zhi.wang.linux@...il.com>,
        "Chen, Bo2" <chen.bo@...el.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>
Subject: RE: [PATCH v14 011/113] KVM: TDX: Add C wrapper functions for
 SEAMCALLs to the TDX module

On Friday, June 9, 2023 4:11 AM, Isaku Yamahata wrote:
> How about this comment?
> 
> 	if (unlikely(ret == TDX_SEAMCALL_UD)) {

Where is the TDX_SEAMCALL_UD error code documented in the spec?
I failed to find it.

> 		/*
> 		 * TDX requires VMXON or #UD.  

TDX requires #UD? Seems a bit ambiguous.

> In the case of reboot or kexec,
> 		 * kvm shutdown notifier, kvm_shutdown(), makes VMX off
> (VMXOFF)
> 		 * while TDs can be still running to invoke SEAMCALL.  It
> 		 * results in superfluous errors or warnings.
> 		 * If rebooting, return 0 to suppress superfluous messages.
> 		 * If not rebooting, panic by kvm_spurious_fault().
> 		 */
> 		kvm_spurious_fault();

I would put it this way:
SEAMCALLs fail with TDX_SEAMCALL_UD returned when VMX is off.
This can happen when host gets rebooted or live updated. In this case,
the instruction execution is actually ignored as KVM is shut down, so
the error code is suppressed. Other than this, the error is unexpected
and the execution can't continue as the TDX features reply on VMX to
be on.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ