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: <e4e21f7a-ee60-c00a-c8d9-32a6ebe195b7@de.ibm.com>
Date:   Tue, 26 Oct 2021 10:52:40 +0200
From:   Christian Borntraeger <borntraeger@...ibm.com>
To:     Halil Pasic <pasic@...ux.ibm.com>
Cc:     Janosch Frank <frankja@...ux.ibm.com>,
        Michael Mueller <mimu@...ux.ibm.com>,
        linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
        David Hildenbrand <david@...hat.com>,
        Claudio Imbrenda <imbrenda@...ux.ibm.com>,
        Heiko Carstens <hca@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Pierre Morel <pmorel@...ux.ibm.com>,
        Tony Krowiak <akrowiak@...ux.ibm.com>,
        Matthew Rosato <mjrosato@...ux.ibm.com>,
        Niklas Schnelle <schnelle@...ux.ibm.com>, farman@...ux.ibm.com,
        kvm@...r.kernel.org
Subject: Re: [PATCH 3/3] KVM: s390: clear kicked_mask if not idle after set



Am 20.10.21 um 09:52 schrieb Halil Pasic:
> On Tue, 19 Oct 2021 23:35:25 +0200
> Christian Borntraeger <borntraeger@...ibm.com> wrote:
> 
>>> @@ -426,6 +426,7 @@ static void __unset_cpu_idle(struct kvm_vcpu *vcpu)
>>>    {
>>>    	kvm_s390_clear_cpuflags(vcpu, CPUSTAT_WAIT);
>>>    	clear_bit(vcpu->vcpu_idx, vcpu->kvm->arch.idle_mask);
>>> +	clear_bit(vcpu->vcpu_idx, vcpu->kvm->arch.gisa_int.kicked_mask);
> 
> BTW, do you know are bit-ops garanteed to be serialized as seen by
> another cpu even when acting on a different byte? I mean
> could the kick_single_vcpu() set the clear of the kicked_mask bit but
> not see the clear of the idle mask?

clear_bit explicitely says.
  * This is a relaxed atomic operation (no implied memory barriers).

so if we really need the ordering, then we need to add a barrier.

> 
> If that is not true we may need some barriers, or possibly merging the
> two bitmasks like idle bit, kick bit alterating to ensure there
> absolutely ain't no race.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ