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]
Message-ID: <8736b89qb8.fsf@vitty.brq.redhat.com>
Date:   Tue, 18 Feb 2020 10:51:07 +0100
From:   Vitaly Kuznetsov <vkuznets@...hat.com>
To:     linmiaohe <linmiaohe@...wei.com>
Cc:     "kvm\@vger.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86\@kernel.org" <x86@...nel.org>,
        "pbonzini\@redhat.com" <pbonzini@...hat.com>,
        "rkrcmar\@redhat.com" <rkrcmar@...hat.com>,
        "sean.j.christopherson\@intel.com" <sean.j.christopherson@...el.com>,
        "wanpengli\@tencent.com" <wanpengli@...cent.com>,
        "jmattson\@google.com" <jmattson@...gle.com>,
        "joro\@8bytes.org" <joro@...tes.org>,
        "tglx\@linutronix.de" <tglx@...utronix.de>,
        "mingo\@redhat.com" <mingo@...hat.com>,
        "bp\@alien8.de" <bp@...en8.de>, "hpa\@zytor.com" <hpa@...or.com>
Subject: Re: [PATCH] KVM: x86: don't notify userspace IOAPIC on edge-triggered interrupt EOI

linmiaohe <linmiaohe@...wei.com> writes:

> Vitaly Kuznetsov <vkuznets@...hat.com> writes:
>>linmiaohe <linmiaohe@...wei.com> writes:
>>
>>> @@ -417,7 +417,7 @@ void kvm_scan_ioapic_routes(struct kvm_vcpu *vcpu,
>>>  
>>>  			kvm_set_msi_irq(vcpu->kvm, entry, &irq);
>>>  
>>> -			if (irq.level &&
>>> +			if (irq.trig_mode &&
>>>  			    kvm_apic_match_dest(vcpu, NULL, APIC_DEST_NOSHORT,
>>>  						irq.dest_id, irq.dest_mode))
>>>  				__set_bit(irq.vector, ioapic_handled_vectors);
>>
>>Assuming Radim's comment (13db77347db1) is correct, the change in
>>3159d36ad799 looks wrong and your patch restores the status quo. Actually, kvm_set_msi_irq() always sets irq->level = 1 so checking it is pointless.
>>
>>Reviewed-by: Vitaly Kuznetsov <vkuznets@...hat.com>
>
> Thanks for review.
>
>>
>> (but it is actually possible that there's a buggy userspace out there which expects EOI notifications; we won't find out unless we try to fix the bug).
>>
>
> Yeh, there may be a buggy userspace hidden from this unexpected EOI notifications. It may not be worth enough to fix it as we may spend many time
> to catch the bug.
> Perhaps we should only remove the pointless checking of irq->level for cleanup. :)

I'm feeling brave so in case nobody expresses any particular concerns
let's just fix it :-)

-- 
Vitaly

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ