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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CFFFCD77-3B9E-4808-B084-E86F8EF265A7@infradead.org>
Date: Tue, 20 Feb 2024 17:21:52 +0100
From: David Woodhouse <dwmw2@...radead.org>
To: Sean Christopherson <seanjc@...gle.com>, paul@....org
CC: Paolo Bonzini <pbonzini@...hat.com>, Jonathan Corbet <corbet@....net>,
 Christian Borntraeger <borntraeger@...ux.ibm.com>,
 Janosch Frank <frankja@...ux.ibm.com>,
 Claudio Imbrenda <imbrenda@...ux.ibm.com>,
 David Hildenbrand <david@...hat.com>, Heiko Carstens <hca@...ux.ibm.com>,
 Vasily Gorbik <gor@...ux.ibm.com>,
 Alexander Gordeev <agordeev@...ux.ibm.com>,
 Sven Schnelle <svens@...ux.ibm.com>, Thomas Gleixner <tglx@...utronix.de>,
 Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
 Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
 "H. Peter Anvin" <hpa@...or.com>, Shuah Khan <shuah@...nel.org>,
 kvm@...r.kernel.org, linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-s390@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v13 00/21] KVM: xen: update shared_info and vcpu_info handling

On 20 February 2024 17:15:06 CET, Sean Christopherson <seanjc@...gle.com> wrote:
>On Tue, Feb 20, 2024, Paul Durrant wrote:
>> On 20/02/2024 15:55, Sean Christopherson wrote:
>> > On Thu, 15 Feb 2024 15:28:55 +0000, Paul Durrant wrote:
>> > > From: Paul Durrant <pdurrant@...zon.com>
>> > > 
>> > > This series contains a new patch from Sean added since v12 [1]:
>> > > 
>> > > * KVM: s390: Refactor kvm_is_error_gpa() into kvm_is_gpa_in_memslot()
>> > > 
>> > > This frees up the function name kvm_is_error_gpa() such that it can then be
>> > > re-defined in:
>> > > 
>> > > [...]
>> > 
>> > *sigh*
>> > 
>> > I forgot to hit "send" on this yesterday.  But lucky for me, that worked out in
>> > my favor as I needed to rebase on top of kvm/kvm-uapi to avoid pointless conflicts
>> > in the uapi headeres.
>> > 
>> > So....
>> > 
>> > Applied to kvm-x86 xen, minus 18 and 19 (trylock stuff) and 21 (locking cleanup
>> > that we're doing elsewhere).
>> > 
>> 
>> Looks like you meant 17 & 18?
>
>Doh, yes.
>
>> > Paul and David, please take (another) look at the end result to make sure you don't
>> > object to any of my tweaks and that I didn't botch anything.
>> > 
>> 
>> What was the issue with 17? It was reasonable clean-up and I'd like to keep
>> it even without 18 being applied (and I totally understand your reasons for
>> that).
>
>I omitted it purely to avoid creating an unnecessary dependency for the trylock
>patch.  That way the trylock patch (or whatever it morphs into) can be applied on
>any branch (along with the cleanup), i.e. doesn't need to be taken through kvm-x86/xen.

What about if (in_atomic() && read_trylock()) return -EAGAIN; else read_lock();

That way we don't have any even theoretical fairness issues because the trylock can fail just *once* which kicks us to the slow path and that'll take the lock normally now.

The condition might not actually be in_atomic() but I'm not working this week and you get the idea.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ