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

> From: Christoph Hellwig
> Sent: Tuesday, September 6, 2022 5:42 PM
> 
> What is the point?  This adds indirect calls, and actually creates
> more boilerplate code in the drivers.  i.g. when using this code there
> is more, and harder to read code.

The point is to align with struct device life cycle when it's introduced
to vfio_device. The object is released via put_device() then what would
be the alternative if the driver doesn't provide a @release callback?

and with @release then naturally @init is also expected.

Most added code is in patch1 for implementing new helpers and
patch15 for introducing struct device.

Remaining addition is relatively small when scattered in each driver
and most is due to creating new functions hence new local variables.

and IMHO the readability is improved as it clearly contains the
init/release logic around the device object.

Thanks
Kevin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ