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]
Date:   Tue, 07 Sep 2021 00:07:35 +0300
From:   Maxim Levitsky <mlevitsk@...hat.com>
To:     Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>
Cc:     kvm@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Wanpeng Li <wanpengli@...cent.com>,
        Joerg Roedel <joro@...tes.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        Jim Mattson <jmattson@...gle.com>,
        Ingo Molnar <mingo@...hat.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" 
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] KVM: VMX: avoid running vmx_handle_exit_irqoff in
 case of emulation

On Mon, 2021-09-06 at 12:09 +0200, Paolo Bonzini wrote:
> On 26/08/21 18:01, Sean Christopherson wrote:
> > > +	if (vmx->emulation_required)
> > > +		return;
> > Rather than play whack-a-mole with flows consuming stale state, I'd much prefer
> > to synthesize a VM-Exit(INVALID_GUEST_STATE).  Alternatively, just skip ->run()
> > entirely by adding hooks in vcpu_enter_guest(), but that's a much larger change
> > and probably not worth the risk at this juncture.
> 
> I'm going with Maxim's patch for now (and for stable kernels especially)
> but I like the
> 
> 
> +       if (unlikely(static_call(kvm_x86_emulation_required)(vcpu)))
> +               return static_call(kvm_x86_emulate_invalid_guest_state)(vcpu);
> +
> 
> idea.  I'll put a Fixes for 95b5a48c4f2b ("KVM: VMX: Handle NMIs, #MCs and
> async #PFs in common irqs-disabled fn", Linux 5.3).
> 
> Paolo
> 
Note that I posted V2 of this patch series ([PATCH v2 0/6] KVM: few more SMM fixes)

There I addressed the review feedback from this patch series,
and for this particular case, I synthesized invalid VM exit as was suggested.

Best regards,
	Maxim Levitsky

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ