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]
Date:   Fri, 9 Sep 2022 01:52:33 +0000
From:   "Tian, Kevin" <kevin.tian@...el.com>
To:     Eric Farman <farman@...ux.ibm.com>,
        Zhenyu Wang <zhenyuw@...ux.intel.com>,
        "Wang, Zhi A" <zhi.a.wang@...el.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        "Vivi, Rodrigo" <rodrigo.vivi@...el.com>,
        Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Matthew Rosato <mjrosato@...ux.ibm.com>,
        Halil Pasic <pasic@...ux.ibm.com>,
        Vineeth Vijayan <vneethv@...ux.ibm.com>,
        Peter Oberparleiter <oberpar@...ux.ibm.com>,
        "Heiko Carstens" <hca@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        "Alexander Gordeev" <agordeev@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ux.ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>,
        "Tony Krowiak" <akrowiak@...ux.ibm.com>,
        Jason Herne <jjherne@...ux.ibm.com>,
        Harald Freudenberger <freude@...ux.ibm.com>,
        Diana Craciun <diana.craciun@....nxp.com>,
        Alex Williamson <alex.williamson@...hat.com>,
        Cornelia Huck <cohuck@...hat.com>,
        Longfang Liu <liulongfang@...wei.com>,
        Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Yishai Hadas <yishaih@...dia.com>,
        Eric Auger <eric.auger@...hat.com>,
        Kirti Wankhede <kwankhede@...dia.com>,
        "Leon Romanovsky" <leon@...nel.org>,
        Abhishek Sahu <abhsahu@...dia.com>,
        "intel-gvt-dev@...ts.freedesktop.org" 
        <intel-gvt-dev@...ts.freedesktop.org>,
        "intel-gfx@...ts.freedesktop.org" <intel-gfx@...ts.freedesktop.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>
CC:     "Liu, Yi L" <yi.l.liu@...el.com>
Subject: RE: [PATCH v2 13/15] vfio/ccw: Use the new device life cycle helpers

> From: Eric Farman
> Sent: Friday, September 9, 2022 4:51 AM
> 
> On Thu, 2022-09-08 at 07:19 +0000, Tian, Kevin wrote:
> > ping @Eric Farman.
> >
> > ccw is the only tricky player in this series. Please help take a look
> > in case of
> > any oversight here.
> 
> Apologies, I had started looking at v1 before I left on holiday, and
> only returned today.
> 
> >
> > > From: Tian, Kevin <kevin.tian@...el.com>
> > > Sent: Thursday, September 1, 2022 10:38 PM
> > >
> > > ccw is the only exception which cannot use vfio_alloc_device()
> > > because
> > > its private device structure is designed to serve both mdev and
> > > parent.
> > > Life cycle of the parent is managed by css_driver so
> > > vfio_ccw_private
> > > must be allocated/freed in css_driver probe/remove path instead of
> > > conforming to vfio core life cycle for mdev.
> > >
> > > Given that use a wait/completion scheme so the mdev remove path
> > > waits
> > > after vfio_put_device() until receiving a completion notification
> > > from
> > > @release. The completion indicates that all active references on
> > > vfio_device have been released.
> > >
> > > After that point although free of vfio_ccw_private is delayed to
> > > css_driver it's at least guaranteed to have no parallel reference
> > > on
> > > released vfio device part from other code paths.
> > >
> > > memset() in @probe is removed. vfio_device is either already
> > > cleared
> > > when probed for the first time or cleared in @release from last
> > > probe.
> > >
> > > The right fix is to introduce separate structures for mdev and
> > > parent,
> > > but this won't happen in short term per prior discussions.
> 
> I did start looking at the above, while the mdev series is outstanding.
> Will try to get back to that sooner rather than later, but for the
> purposes of this series this patch looks/works fine to me.
> 
> Reviewed-by: Eric Farman <farman@...ux.ibm.com>
> 

Thanks!

Powered by blists - more mailing lists