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: <BN9PR11MB527674C06FAF4DD211B342BB8C419@BN9PR11MB5276.namprd11.prod.outlook.com>
Date:   Wed, 24 May 2023 05:00:40 +0000
From:   "Tian, Kevin" <kevin.tian@...el.com>
To:     Nicolin Chen <nicolinc@...dia.com>
CC:     "Liu, Yi L" <yi.l.liu@...el.com>,
        "joro@...tes.org" <joro@...tes.org>,
        "alex.williamson@...hat.com" <alex.williamson@...hat.com>,
        "jgg@...dia.com" <jgg@...dia.com>,
        "robin.murphy@....com" <robin.murphy@....com>,
        "baolu.lu@...ux.intel.com" <baolu.lu@...ux.intel.com>,
        "cohuck@...hat.com" <cohuck@...hat.com>,
        "eric.auger@...hat.com" <eric.auger@...hat.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "mjrosato@...ux.ibm.com" <mjrosato@...ux.ibm.com>,
        "chao.p.peng@...ux.intel.com" <chao.p.peng@...ux.intel.com>,
        "yi.y.sun@...ux.intel.com" <yi.y.sun@...ux.intel.com>,
        "peterx@...hat.com" <peterx@...hat.com>,
        "jasowang@...hat.com" <jasowang@...hat.com>,
        "shameerali.kolothum.thodi@...wei.com" 
        <shameerali.kolothum.thodi@...wei.com>,
        "lulu@...hat.com" <lulu@...hat.com>,
        "suravee.suthikulpanit@....com" <suravee.suthikulpanit@....com>,
        "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
        "Duan, Zhenzhong" <zhenzhong.duan@...el.com>
Subject: RE: [PATCH v3 3/4] iommufd: Add IOMMU_DEVICE_GET_HW_INFO

> From: Nicolin Chen <nicolinc@...dia.com>
> Sent: Saturday, May 20, 2023 2:30 AM
> 
> Hi Kevin,
> 
> On Fri, May 19, 2023 at 08:42:07AM +0000, Tian, Kevin wrote:
> 
> > > +};
> > > +#define IOMMU_DEVICE_GET_HW_INFO _IO(IOMMUFD_TYPE,
> > > IOMMUFD_CMD_DEVICE_GET_HW_INFO)
> > >  #endif
> >
> > Here we have a naming confusion.
> >
> > 'IOMMU' is the prefix of iommufd ioctls.
> >
> > 'DEVICE' is the subjective.
> >
> > Then "GET_HW_INFO" implies getting hardware info related to
> > this device. then it should not be restricted to the iommu info.
> >
> > with that it's clearer to call it IOMMU_DEVICE_GET_IOMMU_INFO.
> 
> Though the entire ioctl is tied to the input "dev_id", I think
> it isn't really about the device corresponding to the dev_id,
> similar to the IOMMU_HWPT_ALLOC having a dev_id input too. So,
> I think the "IOMMU_DEVICE" here should be interpreted simply
> as "an iommu device". We could also highlight this somewhere
> in the header.

yes this is a good view of it. with that it's not necessary to have
a 'DEVICE' notation in the name which looks confusing with dev_id.

Just IOMMU_GET_HW_INFO for the iommu behind the specified dev_id.

then keep the structure name as iommu_hw_info.

> 
> With that being said, IOMMU_DEVICE_SET/UNSET_DATA should be
> renamed to IOMMU_DEVICE_SET/UNSET_DEV_DATA -- "DEVICE" is the
> iommu device while the "DEV_DATA" is a given device that's
> behind the iommu.

this then becomes IOMMU_SET/UNSET_DEV_DATA.

> 
> > similarly for struct iommu_hw_info.
> >
> > 'iommu' is the prefix for all iommufd ioctl structures.
> >
> > then 'hw_info' is too broard.
> >
> > iommu_device_iommu_info reads better? though having two
> > iommu's in the name is a little bit annoying...
> 
> How about:
> IOMMU_DEVICE_GET_FEATURES
> struct iommu_device_features
> ?
> 
> Thanks
> Nic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ