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:   Tue, 23 Jun 2020 13:34:49 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Igor Mammedov <imammedo@...hat.com>
Cc:     linux-kernel@...r.kernel.org, sean.j.christopherson@...el.com,
        vkuznets@...hat.com, kvm@...r.kernel.org, wanpengli@...cent.com
Subject: Re: [PATCH] kvm: lapic: fix broken vcpu hotplug

On 23/06/20 13:13, Igor Mammedov wrote:
>>> +	apic->vcpu->kvm->arch.apic_map_dirty = true;
>>>  	kvm_lapic_set_base(vcpu, vcpu->arch.apic_base);
>>>  	/* set SPIV separately to get count of SW disabled APICs right */
>>>  	apic_set_spiv(apic, *((u32 *)(s->regs + APIC_SPIV)));
>>>   
>> Queued, but it's better to set apic_map_dirty just before the call to
>> kvm_recalculate_apic_map, or you can have a variant of the race that you
>> pointed out.
> Here I was worried about failure path as well that is just before normal
> kvm_recalculate_apic_map(), and has its own kvm_recalculate_apic_map().
> 
> but I'm not sure if we should force map update in that case.
> 

In that case kvm_lapic_set_base and apic_set_spiv will take care of it
(and if it kvm_apic_state_fixup writes LDR, it succeeds and you go down
the other path).

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ