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  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:   Sat, 02 May 2020 19:43:59 +0300
From:   Maxim Levitsky <mlevitsk@...hat.com>
To:     Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org
Cc:     Suravee Suthikulpanit <suravee.suthikulpanit@....com>,
        linux-kernel@...r.kernel.org
Subject: Re: AVIC related warning in enable_irq_window

On Sat, 2020-05-02 at 18:42 +0200, Paolo Bonzini wrote:
> On 02/05/20 15:58, Maxim Levitsky wrote:
> > The AVIC is disabled by svm_toggle_avic_for_irq_window, which calls
> > kvm_request_apicv_update, which broadcasts the KVM_REQ_APICV_UPDATE vcpu request,
> > however it doesn't broadcast it to CPU on which now we are running, which seems OK,
> > because the code that handles that broadcast runs on each VCPU entry, thus
> > when this CPU will enter guest mode it will notice and disable the AVIC.
> > 
> > However later in svm_enable_vintr, there is test 'WARN_ON(kvm_vcpu_apicv_active(&svm->vcpu));'
> > which is still true on current CPU because of the above.
> 
> Good point!  We can just remove the WARN_ON I think.  Can you send a patch?
> 
> svm_set_vintr also has a rather silly
> 
> static void svm_set_vintr(struct vcpu_svm *svm)
> {
>        set_intercept(svm, INTERCEPT_VINTR);
>        if (is_intercept(svm, INTERCEPT_VINTR))
>                svm_enable_vintr(svm);
> }
> 
> so I'm thinking of just inlining svm_enable_vintr and renaming
> svm_{set,clear}_vintr to svm_{enable,disable}_vintr_window.  Would you
> like to send two patches for this, the first to remove the WARN_ON and
> the second to do the cleanup?

Absolutely! I will send a patch very soon.
Best regards,
	Maxim Levitsky

> 
> Thanks,
> 
> Paolo
> 
> > The code containing this warning was added in commit
> > 
> > 64b5bd27042639dfcc1534f01771b7b871a02ffe
> > KVM: nSVM: ignore L1 interrupt window while running L2 with V_INTR_MASKING=1


Powered by blists - more mailing lists