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] [day] [month] [year] [list]
Date:   Fri, 11 Mar 2022 02:45:30 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Chenyi Qiang <chenyi.qiang@...el.com>
Cc:     Paolo Bonzini <pbonzini@...hat.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>,
        Xiaoyao Li <xiaoyao.li@...el.com>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 1/3] KVM: X86: Extend KVM_SET_VCPU_EVENTS to inject a
 SHUTDOWN event

On Fri, Mar 11, 2022, Chenyi Qiang wrote:
> 
> On 3/11/2022 1:43 AM, Sean Christopherson wrote:
> > On Thu, Mar 10, 2022, Chenyi Qiang wrote:
> > > @@ -4976,6 +4977,9 @@ static int kvm_vcpu_ioctl_x86_set_vcpu_events(struct kvm_vcpu *vcpu,
> > >   		}
> > >   	}
> > > +	if (events->flags & KVM_VCPUEVENT_SHUTDOWN)
> > > +		kvm_make_request(KVM_REQ_TRIPLE_FAULT, vcpu);
> > 
> > Huh.  I think we need to make this bidirection and add it to get_vcpu_events()
> > as well, and treat it as a bug fix.  In direct triple fault cases, i.e. hardware
> > detected and morphed to VM-Exit, KVM will never lose the triple fault.  But for
> > triple faults sythesized by KVM, e.g. the RSM path or nested_vmx_abort(), if KVM
> > exits to userspace before the request is serviced, userspace could migrate the
> > VM and lose the triple fault.
> 
> Good catch. Then the name of this definition is not quit fit now. How about
> changing to KVM_VCPUEVENT_SYTHESIZED_TRIPLE_FAULT?

I don't think the SYNTHESIZED part is necessary.  KVM doesn't make that distinction
for other events/exceptions, and whose to say that KVM won't end up with a case where
a "real" triple fault needs to be migrated.

I do have a slight preference for KVM_VCPUEVENT_TRIPLE_FAULT or KVM_VCPUEVENT_SHUTDOWN,
but it's a very slight preference.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ