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: <9ae42cf8-e3e5-b8aa-ba86-d680feb09830@redhat.com>
Date:   Tue, 27 Jul 2021 23:08:38 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        stable@...r.kernel.org, Stas Sergeev <stsp2@...dex.ru>
Subject: Re: [PATCH v2] KVM: x86: accept userspace interrupt only if no event
 is injected

On 27/07/21 22:58, Sean Christopherson wrote:
>> ---
>>   arch/x86/kvm/x86.c | 12 +++++++++++-
>>   1 file changed, 11 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
>> index 4116567f3d44..5e921f1e00db 100644
>> --- a/arch/x86/kvm/x86.c
>> +++ b/arch/x86/kvm/x86.c
>> @@ -4358,8 +4358,18 @@ static int kvm_cpu_accept_dm_intr(struct kvm_vcpu *vcpu)
>>   
>>   static int kvm_vcpu_ready_for_interrupt_injection(struct kvm_vcpu *vcpu)
>>   {
>> +	/*
>> +	 * Do not cause an interrupt window exit if an exception
>> +	 * is pending or an event needs reinjection; userspace
>> +	 * might want to inject the interrupt manually using KVM_SET_REGS
>> +	 * or KVM_SET_SREGS.  For that to work, we must be at an
>> +	 * instruction boundary and with no events half-injected.
>> +	 */
>>   	return kvm_arch_interrupt_allowed(vcpu) &&
>> -		kvm_cpu_accept_dm_intr(vcpu);
>> +		kvm_cpu_accept_dm_intr(vcpu) &&
> 
> Opportunistically align this indentation?

Yep, good idea.

>> +	        !kvm_event_needs_reinjection(vcpu)
> 
> Missing &&, apparently the mysterious cherry-pick didn't go so well :-)

Well, yeah.  The only way I can excuse myself, is by not being the kind 
of person that yells for such stupid things...

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ