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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8e0b4b16-ce45-449e-4849-29919da3a70f@linux.ibm.com>
Date:   Fri, 30 Jul 2021 09:33:09 -0400
From:   Tony Krowiak <akrowiak@...ux.ibm.com>
To:     Halil Pasic <pasic@...ux.ibm.com>
Cc:     Jason Gunthorpe <jgg@...dia.com>, linux-s390@...r.kernel.org,
        linux-kernel@...r.kernel.org, borntraeger@...ibm.com,
        cohuck@...hat.com, pasic@...ux.vnet.ibm.com, jjherne@...ux.ibm.com,
        alex.williamson@...hat.com, kwankhede@...dia.com, david@...hat.com,
        pbonzini@...hat.com, frankja@...ux.ibm.com, imbrenda@...ux.ibm.com
Subject: Re: [PATCH 2/2] s390/vfio-ap: replace open coded locks for
 VFIO_GROUP_NOTIFY_SET_KVM notification



On 7/28/21 3:42 PM, Halil Pasic wrote:
> On Wed, 28 Jul 2021 09:43:03 -0400
> Tony Krowiak <akrowiak@...ux.ibm.com> wrote:
>
>> This solution was suggested by Jason G and it does in fact resolve
>> the lockdep splat encountered when starting an SE guest with
>> access to crypto resources. There is a chance that the KVM lock
>> can get held while waiting for the lock on the matrix_dev->mutex,
>> but this does not seem like a grave concern to me.
> Yes I agree. I was thinking along the lines: matrix modifications
> via the sysfs take the matrix_dev->lock so the level of contention
> may depend on what userspace is doing...

The probe/remove functions also take the matrix_dev->lock
as does the handle_pqap() function. In any case, while all of
those are possible, in our implementation of AP queue
pass-through, the two functions that take the KVM lock
are invoked when the guest is starting or shutting down,
or when the mdev is hot plugged/unplugged. For the cases of
guest startup/shutdown, it would seem that holding the
kvm->lock while waiting for the matrix_dev->lock shouldn't
be a big problem since the guest will either not be fully up
yet or on its way down. I suppose the hot plug/unplug case
could potentially cause the guest vcpus to pause while processing,
but how often do you anticipate a hot plug to take place?

>
> Regards,
> Halil

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ